Enable Swap on ubilinux

From UpWiki
Jump to: navigation, search

The ubilinux™ installer does not enable Swap by default as it is not recommended to use with Flash memory chips (eMMC, SDcard, SSD).

If you still need to use Swap for a specific reason, you can still enable using a simple procedure as the one described on this page where we are going to enable a 1GB Swap file.

From the ubilinux desktop, open a terminal window and type the following steps:

sudo dd if=/dev/zero of=/swapfile bs=1G count=1

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

To verify that your Swap is enabled you can use the command free or

sudo swapon -s

To make the Swap file available at boot edit /etc/fstab to include the following entry:

/swapfile swap swap defaults 0 0

Save and close and reboot your system to verify that the Swap file is enabled at boot.