Enter your Email


BTOI | © copyight


Feb 8, 2009
Adding temporary Swap Space in Linux!!!

In addition to a swap partition, Linux can also use a swap file. Certain programs can take up huge

amounts of virtual memory, requiring the temporary creation of extra space.

 

To install an extra 64 MB of swap space, for example, we can use the following shell commands:

 

# dd if=/dev/zero of=/swap bs=1024 count=65535

# mkswap /swap

# swapon /swap

 

The "count =" argument to dd determines how big the swap file will be. In this example the swap

file's name is /swap, but the name and location are, generally, arbitrary, depending only on the

file system's available space and your having write permissions in the directory.

 

When we don't require the swap space any more, we can remove it with the following statements:

 

# swapoff /swap

# rm /swap

 

 

0 Comments:

Post a Comment

<< Home