Skip to main content
100%

Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/

✓ Published0🌍 Public
TThanad
Last edited Apr 10, 2015
Created on Jan 19, 2016

This example demonstrates a shell script that expands a Linux system’s swap space by adding an 8 GB swapfile. It first checks the `/etc/fstab` file for an existing swapfile entry, then creates and activates the swapfile using command-line utilities such as `fallocate`, `mkswap`, and `swapon`, and appends the necessary mount line. The script concludes by outputting system memory and swap details via `df`, `/proc/swaps`, and `grep` on `/proc/meminfo`. It uses no visualization libraries, relying solely on terminal output.

AI-generated description

Similar vizzes