标签:sys and add ls -l mount cat mkswap creat ble
1. create a 1G file for the swap.
sudo fallocate -l 1G /swapfile
we can verify that the correct amount of space was reserved by typing:
ls -lh /swapfile
2. Enabling the Swap File.
1.Make the file only accessible by typing:
sudo chmod 600 /swapfile.
2.Make the file as swap space by typing:
sudo mkswap /swapfile
3.Enabling the swap file and allow our system to start utilizing it .
sudo swapon /swapfile.
4.Now you can find that the swap space was added by typing:
free -h / (sudo swapon --show)
标签:sys and add ls -l mount cat mkswap creat ble
原文地址:https://www.cnblogs.com/magicpig666/p/9772003.html