# Increase swapfile size ###### tags: `linux` Increase swapfile size. ``` $ free -m total used free shared buff/cache available Mem: 15908 12210 2002 902 1694 2577 Swap: 2047 2011 36 $ swapoff -a $ dd if=/dev/zero of=/swapfile bs=1G count=8 $ mkswap /swapfile $ swapon /swapfile $ grep SwapTotal /proc/meminfo SwapTotal: 8191996 kB $ free -m total used free shared buff/cache available Mem: 15908 13786 168 1358 1953 438 Swap: 7999 96 7903 ``` !!! Make sure system has enough free memory first in order to turn off swap.
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up