Linux SWAP Memory

linux

Listed delow is the procedure to create a swap space in Linux:

# fdisk /dev/sda : Create a partition in Linux
# mkswap -v1 /dev/sda10 : Make and format swap partition using this command
# swapon /de/sda10 : Add the new swap space to the existing swap area using this command (this is temporary)
# free -m : Check the total swap memory

# swapoff /dev/sda10 : Take off the additional swap space
# swapon -s : Check existing partition in swap area

Use FSTAB to permanently add the new partition

Procedure to add a swap page:

# dd if=/dev/zero of swapfile bs=1024 count=10000
# mkswap swapfile
# swapon swapfile
# free -m