How do I change the swap space in Linux?
Answer
If you want to add 2GB instead of 1 GB, replace 1G with 2G .
Answer
If you want to add 2GB instead of 1 GB, replace 1G with 2G .
- Create a file which will be used for swap. sudo fallocate -l 1G /swapfile.
- Set the correct permissions. Only the root user should be able to write and read the swap file.
- Set up a Linux swap area.
- Enable the swap.
- Verify the swap status.