using a file for swap space?

David Price davidmprice at
Mon Apr 1 19:29:05 EST 2002

On Mon, Apr 01, 2002 at 04:40:18PM +1000, Martijn van Oosterhout wrote:
> Yes, you can swap to a file. Use dd if=/dev/zero count=<blocks> bs=<blocksize>
> to create the file and then specify it instead of a partition.

In addition to that, I think you'll need to use mkswap to initialise
the file as a swap file.  Also, you can use swapon to test it out (in
addition to adding it to /etc/fstab).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url :

More information about the linux mailing list