Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Swap is a special area on your computer, which the operating system can use as additional RAM.
- Starting with Ubuntu 17.04, the swap partition was replaced by a swap file. The main advantage of the swap file is easy resizing.
- In the following example, we’ll extend the swap space available in the /swapfile from 4 GB to 8 GB.
- Turn off all swap processes
- 1
- sudo swapoff -a
- Resize the swap
- 2
- sudo dd if=/dev/zero of=/swapfile bs=1G count=8
- if = input file
- of = output file
- bs = block size
- count = multiplier of blocks
- Make the file usable as swap
- 2
- sudo mkswap /swapfile
- Activate the swap file
- 3
- sudo swapon /swapfile
- Check the amount of swap available
- 4
- grep SwapTotal /proc/meminfo
- DONE!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement