Extend Swap File: Difference between revisions
From Jedisaber Wiki
No edit summary |
mNo edit summary |
||
| Line 17: | Line 17: | ||
<code>swapon /swapfile_extend_4GB</code> | <code>swapon /swapfile_extend_4GB</code> | ||
Add the following to /etc/fstab:<br /> | ''' Add the following to /etc/fstab: ''' <br /> | ||
(So it will persist upon reboot.) | (So it will persist upon reboot.) | ||
<code>/swapfile_extend_4GB none swap sw 0 0</code> | <code>/swapfile_extend_4GB none swap sw 0 0</code> | ||
Latest revision as of 00:31, 5 March 2025
How to Increase Swap Space in Linux
Create a file for swap space
fallocate -l 4G /swapfile_extend_4GB
Set permissions
chmod 600 /swapfile_extend_4GB
Format it for swap
mkswap /swapfile_extend_4GB
Enable swap on it
swapon /swapfile_extend_4GB
Add the following to /etc/fstab:
(So it will persist upon reboot.)
/swapfile_extend_4GB none swap sw 0 0
