Sunday, 18 December 2016

Script to add swap file to CentOS

A quick copy/paste to enable a 4GB swap file on Centos 6/7:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo “/swapfile swap swap sw 0 0” >> /etc/fstab Click here for more details..

Contact Details:
Jaytag Computer Limited
Maddison House, 226 High Street
Croydon, Surrey, CR9 1DF
Phone: 08007879258
Web: https://www.jaytag.co.uk/

No comments:

Post a Comment