Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've installed Debian Wheezy and after installation completed, I realized that I forgot to set the swap memory. So now, how can I configure the swap space?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Try this:

  1. Create a partition or RAID array or logical volume... (or use an existing one) for swap
  2. mkswap that partition
  3. Run blkid that-block-device
  4. Add an entry to /etc/fstab in the form UUID=7321174b-e4d8-4d9d-b223-113a1b8e9c9f swap swap sw 0 0 (see step 3 for actual UUID)
  5. swapon -a or reboot
share|improve this answer
You can also use a file instead of a partition. It's slower, but will get the job done if you don't have room for an additional partition. –  jordanm Sep 17 '12 at 22:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.