Add Swap on Linux
From: FelipeCruz
To add swap partition use command
# mkswap /dev/hdb2 # swapon /dev/hdb2 # vi /etc/fstab # /dev/hdb2 swap swap defaults 0 0
With assuming you already create /dev/hdb2 partition before using fdisk and chose swap filesystem.
To add a swap file:
# dd if=/dev/zero of=/swapfile bs=1024 count=65536 # mkswap /swapfile # swapon /swapfile # vi /etc/fstab # /swapfile swap swap defaults 0 0
Check swap status:
# cat /proc/swaps # free
Related posts:
- Check the first time you install Linux OS If you forgot when you deploying (installing) a server (or...
Related posts brought to you by Yet Another Related Posts Plugin.