Skip to content

Instantly share code, notes, and snippets.

@dollarkillerx
Last active April 15, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dollarkillerx/18276a73e5277e15c50c9a725592561e to your computer and use it in GitHub Desktop.
Save dollarkillerx/18276a73e5277e15c50c9a725592561e to your computer and use it in GitHub Desktop.
Ubuntu添加虚拟内存
```sh
sudo -i
cd /
mkdir swap
cd swap
dd if=/dev/zero of=swapfile bs=1024 count=8192000
sudo mkswap swapfile
sudo swapon swapfile
vim /etc/fstab
/swap/swapfile swap swap defaults 0 0
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment