Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home How to add a 12GiB swap volume on Ubuntu

How to add a 12GiB swap volume on Ubuntu

published May 23, 2019 11:20   by admin ( last modified May 23, 2019 11:19 )
sudo fallocate -l 12g /mnt/12GiB.swap

sudo chmod 600 /mnt/12GiB.swap

sudo mkswap /mnt/12GiB.swap

sudo swapon /mnt/12GiB.swap

echo '/mnt/12GiB.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab

Source: https://help.ubuntu.com/community/SwapFaq#How_do_I_add_or_modify_a_swap_partition.3F