Last active
December 25, 2015 23:39
-
-
Save engell/7058735 to your computer and use it in GitHub Desktop.
The list of commands to create a swap-file in linux.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root(~)# fallocate -l 2G /home/engell/.swapfile | |
root(~)# chmod 600 /home/engell/.swapfile | |
root(~)# mkswap /home/engell/.swapfile | |
Setting up swapspace version 1, size = 2097148 KiB | |
no label, UUID=8154dc45-fda4-4f29-b7a8-05f7c864f7a4 | |
root(~)# swapon /home/engell/.swapfile | |
root(~)# free | |
total used free shared buffers cached | |
Mem: 1017740 1003196 14544 0 8388 691664 | |
-/+ buffers/cache: 303144 714596 | |
Swap: 2097148 0 2097148 | |
root(~)# nano /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment