This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:general:swap [2018/08/22 11:24] – [What is Swap?] lunetikk | linux:general:swap [2019/02/12 14:45] (current) – lunetikk | ||
---|---|---|---|
Line 12: | Line 12: | ||
< | < | ||
mkswap / | mkswap / | ||
- | chown root:root /tmp/swapfile | + | chown root:root /swap/swapfile |
chmod 600 / | chmod 600 / | ||
</ | </ | ||
Add the swapfile to swap | Add the swapfile to swap | ||
- | swapon /tmp/swapfile | + | < |
+ | swapon /swap/swapfile | ||
+ | </ | ||
=== Remove a swapfile from swap === | === Remove a swapfile from swap === | ||
- | Turn off the swapfile (used swap will be moved to other swap or memory, might take a while) | + | List the swapfiles |
- | swapoff /swap/swap | + | < |
+ | swapon -s | ||
+ | </ | ||
+ | Turn off the swapfile (used swap will be moved to other swap or memory, might take a while)\\ | ||
+ | < | ||
+ | swapoff /swap/swapfile | ||
+ | </ | ||
\\ | \\ | ||
\\ | \\ | ||
- | ~~DISCUSSION~~ | + | ~~DISCUSSION:closed~~ |