From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Auto-enable swap partitions

Auto-enable swap partitions

From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Start my 1-month free trial

Auto-enable swap partitions

- [Instructor] Now that we've created both a swap partition and a swap file, we will want to make them start automatically. We do this in the ETCFS tab just like with regular partitions and volumes. Let's load FS tab into VI and add the lines for both the swap partition and our swap file. Type in sudo space vi space /etc/fstab and hit Enter. Type in your password if prompted. Go into Insert mode and go to the last line of the file and start a new line. In the first column type in /dev/sdd1 then Tab over a couple times and type in swap Tab a couple more times type swap again and then Tab again, and type in defaults,pri=10. Tab again enter zero space zero. While we're here let's change the priority of the original swap partition to 15. So go up one line, put in a comma and add pri=15. Now let's add another line for our swap file. In the first column type in /swapfile. Tab over and type in swap Tab over again type in swap again and then Tab one more time and type in defaults,pri=5. Tab…

Contents