Linux in the swap partition
How to add a hard disk swap swap partition?
First, establish a normal Linux partition
Second, modifying a partition type of-16
Third, swap Format
Fourth, to enable the swap partition
We have already created some disk partition, you can use fdisk / dev / sdb; p use two commands to edit the partition type partition number to view the Id, 83
t: Modify the partition type number
6: Select the number of partitions you want to modify, here we modify is / dev / sdb6
L: Let prompted to enter the hexadecimal code, we can see all of the hex encoded by this command, it found that 83 ordinary Linux partition, swap swap partition is 82
w: Save and Exit
mkswap / dev / sdb6: format the swap partition, this is not the same with the other format the partition, behind mkswap swap partition is formatted with the device name
swapon / dev / sdb6: Enable formatted swap partition
free: check the status of swap loaded
swapoff / dev / sdb6: stop using the swap formatted