Linux/Swap: Difference between revisions

From Wiki
(Created page with " Category:Linux/System Category:Linux")
 
mNo edit summary
Line 1: Line 1:
== Status ==
<pre>
sudo swapon --show
free -m
</pre>


 
== Create swapfile ==
 
<pre>
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
</pre>




[[Category:Linux/System]]
[[Category:Linux/System]]
[[Category:Linux]]
[[Category:Linux]]

Revision as of 22:40, 19 November 2023

Status

sudo swapon --show
free -m

Create swapfile

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile