os:linux:create_swap_file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
os:linux:create_swap_file [2022-12-10 11:07] – Manuel Frei | os:linux:create_swap_file [2024-06-26 11:58] (current) – change permissions on swap file Manuel Frei | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Linux: Create Swap File ====== | + | ====== Linux - Create Swap File ====== |
===== Short ===== | ===== Short ===== | ||
Line 5: | Line 5: | ||
< | < | ||
fallocate -l 1G /swapfile | fallocate -l 1G /swapfile | ||
+ | chmod 0600 /swapfile | ||
mkswap /swapfile | mkswap /swapfile | ||
swapon /swapfile | swapon /swapfile | ||
Line 53: | Line 54: | ||
< | < | ||
swapon --summary | swapon --summary | ||
- | < | + | </code> |
Example. | Example. | ||
Line 60: | Line 61: | ||
Filename | Filename | ||
/ | / | ||
- | < | + | </code> |
os/linux/create_swap_file.1670666842.txt.gz · Last modified: 2022-12-10 11:07 by Manuel Frei