Foreword

The aim of this guide is to provide the quickest path possible towards passing the LFCS exam. The way you are evaluated in this exam is based on practical exercises, so that’s where I put the focus on with these guides.

If you are a newcomer to Linux, I beg you to not stop here, Operating Systems is an amazing subject. Its history is full of bright engineers who came up with clever solutions that you use on your day to day life. Take a full dive on other articles about the concepts these commands use here.

Learning objectives

Learning GoalCommand
Manage physical storage partitionsfdisk
Manage and configure LVM storage`{vg
Create and configure encrypted storage`cryptsetup [luksFormat
Configure and manage swap spacemkswap `swap [on
Create and manage RAID devicesmdadm `mdadm [–scan
Create and configure FS`makefs.{xfs
Configure filesystems to be mounted on boot/etc/fstab
Mount filesystems on demandmount
Setup user/group disk quotas for FSquotacheck edquota repquota
Create and manage advanced FS permissionsgetfacl setfacl

Review Questions

  1. Create a SWAP partition that is mount on boot
  2. Same but using a SWAP file instead
  3. Modify Swappiness value of the system
  4. Create a software RAID-6 from two partitions
  5. Once the RAID is create save its config
  6. Destroy the created RAID
  7. Re-create it from the config of step 4.1
  8. Add a new spare device to the RAID
  9. Expand the RAID with the new device
  10. Remove the device from the RAID
  11. Create two 200 MB partitions of type raid (fd) either on your hard disk using fdisk, or using LVM.
  12. Create a RAID 1 device named /dev/md0 using the two partitions.
  13. Format the RAID device as an ext4 filesystem. Then mount it at /myraid and make the mount persistent.
  14. Place the information about /dev/md0 in /etc/mdadm.conf , using mdadm
  15. Examine /proc/mdstat to see the status of your RAID device
  16. Setup an encrypted partition
  17. Create a FS in that partition
  18. COnfigure the encrypted partition to be mounted on boot
  19. Add a quota to a specific FS for a specific user
  20. Make that quota persistant across reboots
  21. Create new ACL that allows only the user bob to read and write a file
  22. Make that ACL the default option
  23. Remove the default entry
  24. Remove all the entries
  25. Get the ACL of the file
  26. Create LVM LV from a VG consisnting on two PVs.
  27. Expand the LV by adding a new disk.
  28. Reduce the LV by removing the previously added disk

TODO

  • Make list prettier
  • Make each item of the list a link to a different post
  • Link to conceptual articles