How can I check the size of the swap space in CentOS?

To check the size of the swap in a CentOS system, you can use the following command:

  1. Display information about available disk space in human-readable format
free -h
  1. Display information about swap usage.
cat /proc/swaps
  1. display current swap usage
swapon --show

You can use any of the three commands above to check the size of the swap, just choose one.

bannerAds