• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to know how many swap space exist in linux system

August 5, 2013 by Sharad Chhetri Leave a Comment

How to know how many swap space exist in system

When I started using linux I was curious to know from where I can get info, how many swap space exist in system.
I hope this post will help the linux beginners.
To know about how many swap space exist in system either it is in activated or deactivated use the given below command.

cat /proc/swaps

Given below is reference of my system

root@ubuntu:/# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/swapfile-2                             file		524284	0	-2
/swapfile-additional                    file		1048572	0	-1
/dev/dm-1                               partition	1044476	0	-3
root@ubuntu:/#

To know how many swap space are in Activated states

Use below given command

swapon -s

Below is the reference of my system

root@ubuntu:/# swapon -s
Filename				Type		Size	Used	Priority
/swapfile-2                             file		524284	0	-1
/dev/mapper/ubuntu-swap_1               partition	1044476	0	-2
root@ubuntu:/#

Note: /swapfile-additional is disable hence it is not shown in Output

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Linux enable or disable multiple swap space
  2. How to find swap partition or file in linux
  3. Add swap file in linux without reboot after OS installation
  4. ERROR: Module rewrite does not exist
  5. Create new swap file on CentOS 7 / RHEL 7
  6. df command not showing correct free space in linux
  7. Convert new line to space by using sed command
  8. fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device
  9. vi : remove space at beginning and end of each line
  10. tr command to convert lines to space , tab and vertical tab

Filed Under: Linux Tagged With: swap

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to change smtp port number 25 in postfix

Forgot root password ,Reset it in Run level 1

WordPress host IP changed not able to open wp-admin and site page looks scattered

Install libjpegtran by using yum command in CentOS 6.x

df command not showing correct free space in linux

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy