Skip to content

Instantly share code, notes, and snippets.



Last active Apr 22, 2020
What would you like to do?
CentOS 7 Virtual RAM
# In this case, I use 2G swapfile or virtual RAM
sudo dd if=/dev/zero of=/swapfile count=1024 bs=1MiB
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
You can’t perform that action at this time.