Introduction:
Sometimes we encounter problems when installing the OS when the swap partition is too small, causing some big software to fail to install. We can increase the space of the swap partition under Linux.
The following actions are performed under the root user:
0, record the original swap partition size, with FREE-M view
1, first set up a partition, using the DD command such as
DD If=/dev/zero Of=/home/swap bs=1024 count=512000
Description: This creates a/home/swap partition file. The size of the file is 512,000 blocks, normally 1 blocks are 1 K, so the space here is 512M.
2. Then turn this partition into a swap partition.
/sbin/mkswap/home/swap
3. Then use this swap partition. Make it a valid state.
/sbin/swapon/home/swap
4, modify the/etc/fstab file, change the new swap partition to auto start, add the following line
Vi/etc/fstab
/home/swap swap swap defaults 0 0
5. Use free-m to see if swap is increasing
Linux Increases swap Space