Add swap space in Linux

Addiding Swap space:

Give below commands as root user

# dd if=/dev/zero of=
swapfile bs=1k count=500000
# chmod 600 swapfile
# mkswap
swapfile
# swapon swapfile

Removing added Swapspace:

Give below commands as root user
# swapoff tmpswap
# rm tmpswap

Neelesh Gurjar has written 122 articles

Leave a Reply