diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2024-05-09 11:22:28 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2024-05-09 11:22:28 +0200 |
commit | f9618f87dec3afab301f0329d48661eaeaaa64df (patch) | |
tree | 4977a9762721356701bb13771e35816d9a98571d /system-utils.md | |
parent | 78a3f1270442dba32a43b946e81265055c4ebe38 (diff) |
Add swapfile setup
Diffstat (limited to 'system-utils.md')
-rw-r--r-- | system-utils.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system-utils.md b/system-utils.md index 24b9b02..3c7adab 100644 --- a/system-utils.md +++ b/system-utils.md @@ -7,3 +7,18 @@ Set file permissions of mounted drive at mount time: mount /dev/foo /mnt/bar -o umask=000 + +## Setting up a swap file + +From https://linuxize.com/post/create-a-linux-swap-file/ + + sudo fallocate -l 1G /swapfile + # or if the above fails: + # sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + # Add to /etc/fstab + /swapfile swap swap defaults 0 0 + # Check with + free -h |