How to make a swap partition

How to make a swap partition on Linux?

asked Jan 24, 2013 by anonymous

1 Answer

Best answer

First, make a new partition (or reuse an existing one if you like).

I suggest using cfdisk to create it:

Then, turn the new partition (say, /dev/sdc1) to a swap

# mkswap /dev/sdc1

Lastly, turn it on

# swapon /dev/sdc1

You can check whether its status by

# swapon -s

You can also added it to /etc/fstab to enable it automatically each time Linux start by adding a line

/dev/sdc1    swap     swap    defaults    0 0
answered Jan 24, 2013 by anonymous
selected Feb 13, 2013
permission denied asked Aug 6, 2014 by superabels

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost