Linux swap partition management

1, the configuration is defined swap

the sudo  dd  IF = / dev / ZERO of = / Home / swap BS = 1024 count = 500000 

# Note: of = / Home / swap, placement space the swap; Size The size count is increased swap space, and 1024 is the block size here is a 1K, so the total space is bs * count = 500M.

 

 

 

2, the swap space format formatted

sudo mkswap /home/swap 

 

 

3, the use of swap space created above

The sudo swapon / home / swap space on one

 

4, the original re-start other businesses, such as to continue to make:

  make clean

    make && make install

 

5, (established after the end of the original business) closed temporary swap space just opened up

sudo swapoff /home/swap     

 

6, delete the temporary swap space just opened up

cd /home/

sudo rm swap

 

Guess you like

Origin www.cnblogs.com/hopkings/p/12521510.html