📌  相关文章
📜  ubuntu 一直冻结 20.04 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:51.740000             🧑  作者: Mango

代码示例1
#Check the amount of swap you have
grep SwapTotal /proc/meminfo
#Turn off the swap process
sudo swapoff -a
#Resize the swap (in my case I expanded it to 16 GB)
sudo dd if=/dev/zero of=/swapfile bs=1G count=16
#Attach the swap to the partition
sudo mkswap /swapfile
#Activate swap (enable it)
sudo swapon /swapfile
#See the new swap size
grep SwapTotal /proc/meminfo