How To Add A Swap File To Redhat V7

Step-By-Step Guide

1. Add a new raw disk.

For example;


2. Make the swap file

/sbin/mkswap /dev/sdag

3. Turn swap on

/sbin/swapon /dev/sdag

To Check to see if swap exists use one of the following commands;

  • swapon
  • free
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License