Created
December 29, 2016 15:25
-
-
Save sdtaylor/8205de113f7bdb488daead18801a6e01 to your computer and use it in GitHub Desktop.
Linux swap file stuff
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
#Create a new file | |
sudo fallocate -l 4G /swapfile | |
#RW for root only | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
#check swap | |
sudo swapon -s | |
#Initiate on boot | |
sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment