Linux notes

From Mann Systems
Jump to: navigation, search

Swapfile

How to create a swapfile if there's no swap partition:

# fallocate -l 4G /swapfile
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile

Add to /etc/fstab:

/swapfile swap swap defaults 0 0