📜  如何更改 ubuntu 上的交换空间 - Shell-Bash 代码示例

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

代码示例1
# Disable Swap
sudo swapoff /swapfile
# Edit Swapfile to desired size, 2G, 4G etc
sudo fallocate -l 2G /swapfile
# Enable Swap again
sudo swapon /swapfile
# You can check your new swap with
sudo swapon --show