Ubuntu add a swap file into another disk
1 2 3 4 5 6 7 8 9 |
$sudo fallocate -l 16G /SWAPDISK/swapfile $ sudo chmod 600 /SWAPDISK/swapfile $ sudo mkswap /SWAPDISK/swapfile Setting up swapspace version 1, size = 16 GiB (17179865088 bytes) no label, UUID=20859f1c-acc8-43e4-806f-c8f6339b1601 $ sudo swapon /SWAPDISK/swapfile |
1 |
sudo nano /etc/fstab |
1 |
sudo swapon --show |