Instantly share code, notes, and snippets.

Embed
What would you like to do?
CentOS 7 Virtual RAM
# In this case, I use 2G swapfile or virtual RAM
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sh -c '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