Project

mkswapfile

0.0
No commit activity in last 3 years
No release in over 3 years
mkswapfile - make and enable a swap file easily.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.1
~> 13.0.1
 Project Readme

mkswapfile

mkswapfile - make and enable a swap file easily.

This gem supports only Linux.

Installation

$ gem install mkswapfile
(you may need to run as root or through sudo.)

Usage

$ sudo mkswapfile size
size: 1-8 (GB)


EXAMPLE

$ sudo mkswapfile 2
dd if=/dev/zero of=/swap bs=1M count=2049 && chmod 600 /swap && mkswap /swap && \ 
(echo '/swap swap swap defaults 0 0' | tee -a /etc/fstab) && swapon /swap
....

$ free -m
              total        used        free      shared  buff/cache   available
Mem:            481          90          11           0         379         378
Swap:          2048           0        2048

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/s3fxn/mkswapfile.

License

The gem is available as open source under the terms of the MIT License.