Ubuntu add a swap file into another disk
$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
sudo nano /etc/fstab
sudo swapon --show