LFCS / drills

drills

best round: 0/60

1. Append 'done' to log.txt without overwriting

2. Count lines in /etc/passwd

3. Follow the tail of /var/log/syslog live

4. Replace all 'foo' with 'bar' in f.txt in place

5. Find all SUID files system-wide

6. Symlink 'cur' → /opt/app/v2

7. Recursively grep 'ERROR' under /var/log

8. Print 1st & 3rd colon-fields of /etc/passwd

9. Show 5 largest dirs under /var

10. Extract archive.tar.gz into /opt

11. Enable AND start nginx now

12. Check if a service is enabled at boot

13. Reload systemd after editing a unit

14. Permanently block (mask) telnet

15. Set default boot target to CLI

16. Show this-boot journal for sshd

17. List failed systemd units

18. List all systemd timers

19. Add root cron: x.sh daily at 03:15

20. One-off job at 09:00 today

21. Which pkg owns /usr/bin/tree

22. List files installed by pkg curl

23. Append user bob to group docker

24. Lock the account 'eve'

25. Set bob's shell to nologin

26. Expire alice's account on 2026-12-31

27. Set max password age 90 days for bob

28. Create user joe: home, bash, group ops

29. Give alice passwordless sudo (dropin)

30. chmod so file = rwxr-x---

31. Set SGID on directory /shared

32. Set sticky bit on a dir

33. ACL: give carol rwx on /srv/data

34. Default ACL so new files inherit carol rwx

35. Make file immutable

36. Set persistent hostname web01

37. Open tcp 8080 permanently (firewalld)

38. Show listening ports with PIDs

39. Disable SSH root login

40. Show the routing table

41. Set timezone to America/New_York

42. Enable NTP sync

43. Make xfs filesystem on /dev/sdb1

44. Get the UUID of /dev/sdb1

45. Create PV on /dev/sdc

46. Create VG 'vg0' on /dev/sdc

47. Create 4G LV 'lv0' in vg0

48. Grow lv0 by 2G incl. filesystem

49. Show all PVs/VGs/LVs

50. Make + enable a 1G swapfile

51. Open a LUKS device as 'vault'

52. Reread partition table after fdisk

53. Verify fstab without rebooting

54. Load kernel module br_netfilter now

55. Persist that module at boot

56. RHEL: restore SELinux context on /web

57. RHEL: allow nginx on tcp 8088 (SELinux)

58. RHEL: persistently set an SELinux boolean

59. Resize ext4 fs to fill its LV

60. Show current SELinux enforcing mode