Skip to content

Instantly share code, notes, and snippets.

@feilongfl
Created February 12, 2021 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feilongfl/3c3bd21395468f5e7d26a6d1ba9eeffd to your computer and use it in GitHub Desktop.
Save feilongfl/3c3bd21395468f5e7d26a6d1ba9eeffd to your computer and use it in GitHub Desktop.
linux swap
#!/usr/bin/env fish
set swap_file /home/feilong/Program-ext/swap/swapfile
fallocate -l 100G $swap_file
chmod 600 $swap_file
mkswap $swap_file
swapon $swap_file
# swapoff -v $swap_file
# rm $swap_file
#!/usr/bin/env fish
set swap_file /home/feilong/Program-ext/swap/swapfile
# fallocate -l 100G $swap_file
# chmod 600 $swap_file
# mkswap $swap_file
# swapon $swap_file
swapoff -v $swap_file
rm $swap_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment