# Optional: Check the current swapfile
free -h
# Remove the current swapfile
sudo swapoff /swapfile
sudo rm /swapfile
# Create a new swapfile
sudo fallocate -l 32G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Optional: Check if the change is reflected
free -h
Ubuntu 设置交换内存
最新推荐文章于 2024-09-27 13:12:37 发布