Skip to content

Instantly share code, notes, and snippets.

@feilongfl
Created February 12, 2021 00:19
Embed
What would you like to do?
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