TIPS & TRICKS
To search the contents of the man pages
# man -k searchterm |
Swap partition tasks examples
Don’t forget
# mkswap /dev/sdb1 |
And in fstab:
UUID=29ee03a0-196a-42cd-986f-4560097c9764 swap swap defaults 0 0 |
Create a swap partition 1
Create a swap partition of 512MB at /dev/sdb, with a persistent prioity of 20.
# free -m |
# fdisk /dev/sdb/ // g, n, +512M, t, swap, w |
Add the priority in fstab instead of default parameter:
# vim /etc/fstab |
Note:
Priority can be added when swappon command is invoqued, but not persistent:
# swapon -p 20 /dev/sdb1 |
# mount -a |
# swapon -s |
# free -m |
Create a swap partition 2
| Add aditional swap partition of 2GB using /dev/sddX and mount it permanently.
# lsblk [-fp] |
# fdisk /dev/sdd |
# partprobe |
To mount swap permanently make entry in fstab:
# vim /etc/fstab |
Documentations
Internet
Git
ChatGPT