Pages

Friday, January 28, 2011

Move/add swap partition in Ubuntu

    To see the amount of existing swap space:
cat /proc/meminfo |grep -i swap
The output should be something like below. Full explanation of /proc/meminfo here.
SwapCached:  2244 kB
SwapTotal:  1052248 kB
SwapFree:  1043908 kB
 If you want to add a new swap partition, or delete the existing one and create another:
sudo swapoff -a
sudo mkswap /dev/sda3
#Edit fstab to add the UUID given by sudo blkid command. Then:
sudo swapon -a
#Check
swapon -s
References:
  1. /proc/meminfo Explained 

No comments:

Post a Comment