Created
July 13, 2022 09:10
-
-
Save placek/a60eb4c8fecfef4461e87712026b3761 to your computer and use it in GitHub Desktop.
Add swap file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=/swap_file bs=1G count=16 # create a zero-filled 16GB swap file | |
fallocate -l 16G /swap_file # alternative, faster way | |
chmod 600 /swap_file # chmod | |
mkswap /swap_file # make swap partition on file | |
swapon /swap_file # apply swap file as a swap partition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment