Skip to content

Instantly share code, notes, and snippets.

@aristidesneto
Created December 22, 2017 17:56
Show Gist options
  • Select an option

  • Save aristidesneto/da6462ce454a786e307cdc009021a143 to your computer and use it in GitHub Desktop.

Select an option

Save aristidesneto/da6462ce454a786e307cdc009021a143 to your computer and use it in GitHub Desktop.
Adicionar swap ao sistema
# Cria uma partição (swapfile) na raiz do sistema e ativa em seguida
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
# Editar o arquivo /etc/fstab e adicionar a linha abaixo
/swapfile none swap sw 0 0
# Confirme se deu certo
ls -lh /swapfile
# Forçar a montagem da partição
mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment