askesis

Advanced Linux filesystem: 50 config files and logs

Deeper Linux files for LPIC-1: profile.d, sudoers.d, systemd units, GRUB config, nsswitch.conf, ld.so.conf, distro logs and /lib/modules. Free flashcards.

IT & DevOpsAdvanced50 cardsFree

Practice now

Study without an account

0 of 50 seen0 graduated
What is /lost+found for?

Scheduled with the default Askesis timings. Progress is saved in this browser.

All 50 cards

  1. 1
    What is /lost+found for?
    Where fsck puts recovered files that lost their directory entry after a crash.
    One at the top of each ext2/3/4 filesystem; normally empty.
  2. 2
    What is /usr/share/man for?
    The manual pages, one subdirectory per section (man1, man5, man8…).
  3. 3
    What is /var/spool for?
    Queues of work waiting to be processed: print jobs, outgoing mail, users’ crontabs.
    e.g. /var/spool/cron (edit crontabs with crontab -e, never directly) and /var/spool/cups.
  4. 4
    What is /etc/profile.d for?
    Extra *.sh scripts that /etc/profile runs at every login.
    The tidy place for your own system-wide environment settings.
  5. 5
    What is /etc/sudoers.d for?
    Extra sudo rule files, included by /etc/sudoers.
    Edit them with visudo -f /etc/sudoers.d/NAME.
  6. 6
    What is /etc/systemd/system for?
    The administrator’s own and overriding systemd unit files.
    They take precedence over the packaged units in /usr/lib/systemd/system (/lib/systemd/system on older Debian).
  7. 7
    What is /etc/cron.daily for?
    Scripts that run once a day (siblings: cron.hourly, cron.weekly, cron.monthly).
    Started by cron through run-parts, or by anacron on machines that aren’t always on.
  8. 8
    What is /etc/yum.repos.d for?
    The .repo files that define the package repositories for yum/dnf.
    The Debian counterpart is /etc/apt/sources.list plus /etc/apt/sources.list.d/.
  9. 9
    What is /lib/modules for?
    The kernel modules, in one subdirectory per kernel version.
    The running kernel’s modules are in /lib/modules/$(uname -r)/.
  10. 10
    What is /etc/login.defs?
    Defaults for new accounts: UID and GID ranges, password aging, home directory creation.
  11. 11
    What is /etc/shells?
    The list of valid login shells.
    chsh accepts only a shell listed here.
  12. 12
    What is /proc/mounts?
    The filesystems mounted right now, as the kernel sees them.
    /etc/mtab is usually a symlink to the same list.
  13. 13
    What is /boot/grub/grub.cfg?
    GRUB 2’s generated boot menu configuration; don’t edit it by hand.
    RHEL: /boot/grub2/grub.cfg. Regenerate it with grub-mkconfig -o (grub2-mkconfig on RHEL, update-grub on Debian).
  14. 14
    What is /etc/default/grub?
    The GRUB 2 settings you edit (timeout, default entry, kernel parameters) before regenerating grub.cfg.
  15. 15
    What is /etc/nsswitch.conf?
    The order of sources for lookups, e.g. hosts: files dns.
  16. 16
    What is /etc/services?
    Maps service names to port numbers and protocols, e.g. ssh 22/tcp.
  17. 17
    What is /etc/ssh/ssh_config?
    The system-wide configuration of the SSH client, ssh.
    Per-user client settings go in ~/.ssh/config.
  18. 18
    What is /etc/ld.so.conf?
    Extra directories the dynamic linker searches for shared libraries.
    Plus /etc/ld.so.conf.d/. Run ldconfig after a change to rebuild /etc/ld.so.cache.
  19. 19
    What is /etc/localtime?
    The system time zone: a symlink to a file in /usr/share/zoneinfo.
    timedatectl set-timezone changes it.
  20. 20
    What is /proc/cmdline?
    The parameters the running kernel was booted with.
  21. 21
    What is /var/log/syslog?
    The general system log on Debian/Ubuntu.
    Red Hat-family systems use /var/log/messages.
  22. 22
    What is /var/log/messages?
    The general system log on Red Hat-family systems.
    Debian/Ubuntu use /var/log/syslog.
  23. 23
    What is /var/log/auth.log?
    Authentication events on Debian/Ubuntu: logins, sudo, SSH.
    Red Hat-family systems use /var/log/secure.
  24. 24
    What is /var/log/secure?
    Authentication events on Red Hat-family systems: logins, sudo, SSH.
    Debian/Ubuntu use /var/log/auth.log.
  25. 25
    What is /dev/zero?
    A device that supplies an endless stream of zero bytes when read.
    e.g. dd if=/dev/zero of=swapfile bs=1M count=1024.
  26. 26
    Where does fsck put recovered files that lost their directory entry?
    /lost+found
    One at the top of each ext2/3/4 filesystem; normally empty.
  27. 27
    Where are the man pages stored?
    /usr/share/man
  28. 28
    Which directory holds queues of pending work, such as print jobs, outgoing mail and users’ crontabs?
    /var/spool
    e.g. /var/spool/cron (edit crontabs with crontab -e, never directly) and /var/spool/cups.
  29. 29
    Which directory holds *.sh snippets that /etc/profile runs at every login?
    /etc/profile.d
    The tidy place for your own system-wide environment settings.
  30. 30
    Which directory holds extra sudo rule files that /etc/sudoers includes?
    /etc/sudoers.d
    Edit them with visudo -f /etc/sudoers.d/NAME.
  31. 31
    Where does an administrator put custom or overriding systemd unit files?
    /etc/systemd/system
    They take precedence over the packaged units in /usr/lib/systemd/system (/lib/systemd/system on older Debian).
  32. 32
    Which directory holds the scripts that run once a day?
    /etc/cron.daily
    Started by cron through run-parts, or by anacron on machines that aren’t always on.
  33. 33
    On a Red Hat-family system, which directory holds the .repo files that define the package repositories?
    /etc/yum.repos.d
    The Debian counterpart is /etc/apt/sources.list plus /etc/apt/sources.list.d/.
  34. 34
    Where are the kernel modules stored?
    /lib/modules
    The running kernel’s modules are in /lib/modules/$(uname -r)/.
  35. 35
    Which file sets defaults such as UID ranges and password aging for newly created users?
    /etc/login.defs
  36. 36
    Which file lists the valid login shells?
    /etc/shells
    chsh accepts only a shell listed here.
  37. 37
    Which file shows the kernel’s list of currently mounted filesystems?
    /proc/mounts
    /etc/mtab is usually a symlink to the same list.
  38. 38
    Which file is GRUB 2’s generated boot menu configuration?
    /boot/grub/grub.cfg
    RHEL: /boot/grub2/grub.cfg. Regenerate it with grub-mkconfig -o (grub2-mkconfig on RHEL, update-grub on Debian).
  39. 39
    Which file do you edit to change GRUB 2’s timeout or the kernel parameters?
    /etc/default/grub
  40. 40
    Which file decides whether /etc/hosts or DNS is consulted first?
    /etc/nsswitch.conf
  41. 41
    Which file maps well-known service names to port numbers?
    /etc/services
  42. 42
    Which file configures the SSH client for all users?
    /etc/ssh/ssh_config
    Per-user client settings go in ~/.ssh/config.
  43. 43
    Which file lists extra directories to search for shared libraries?
    /etc/ld.so.conf
    Plus /etc/ld.so.conf.d/. Run ldconfig after a change to rebuild /etc/ld.so.cache.
  44. 44
    Which file sets the system’s time zone?
    /etc/localtime
    timedatectl set-timezone changes it.
  45. 45
    Which file shows the parameters the running kernel was booted with?
    /proc/cmdline
  46. 46
    On Debian/Ubuntu, which file is the main general-purpose system log?
    /var/log/syslog
    Red Hat-family systems use /var/log/messages.
  47. 47
    On a Red Hat-family system, which file is the main general-purpose system log?
    /var/log/messages
    Debian/Ubuntu use /var/log/syslog.
  48. 48
    On Debian/Ubuntu, which log records logins, sudo use and SSH authentication?
    /var/log/auth.log
    Red Hat-family systems use /var/log/secure.
  49. 49
    On a Red Hat-family system, which log records logins, sudo use and SSH authentication?
    /var/log/secure
    Debian/Ubuntu use /var/log/auth.log.
  50. 50
    Which device supplies an endless stream of zero bytes, e.g. for dd?
    /dev/zero
    e.g. dd if=/dev/zero of=swapfile bs=1M count=1024.

Frequently asked questions

Why learn distribution-specific log files?

Because you will meet both. Debian and Ubuntu log to /var/log/syslog and /var/log/auth.log, Red Hat-family systems to /var/log/messages and /var/log/secure, and exams ask about both.

What is a drop-in directory?

A .d directory, such as /etc/sudoers.d or /etc/profile.d, whose files are read alongside the main file. Packages and admins add their own files there instead of editing the main one, so updates don’t overwrite changes.

Is this enough for the LPIC-1 filesystem topics?

Together with the basics and intermediate decks it covers the paths the exam expects you to know. Pair it with the Linux command line deck and hands-on practice in a virtual machine.

Intermediate

Linux command line

Linux commands and files for sysadmins and LPIC-1 candidates: find and grep, permissions and special bits, fstab, systemd targets, package managers, users, cron and more.

50 cards
Beginner

Linux filesystem basics

Learn the Linux directory tree: what /etc, /var, /usr, /proc and /dev are for, plus passwd, shadow, fstab and hosts. Free flashcards, no signup.

50 cards
Intermediate

Intermediate Linux filesystem

Linux paths admins use daily: /usr/local, /var/lib, /run, /sys, /etc/skel, sudoers, Bash startup files, SSH keys, resolv.conf and /proc. Free flashcards.

50 cards
Beginner

Bash scripting

Bash scripting flashcards: shebangs, quoting, exit codes, tests, loops, functions, arrays, parameter expansion, redirection, set -euo pipefail and traps.

50 cards
Beginner

Vim

Learn Vim from the keyboard up: modes, motions, operators and text objects, search and :s substitutions, registers, macros, visual mode and windows.

50 cards
Beginner

Networking

Computer networking fundamentals: OSI and TCP/IP layers, TCP vs UDP, common port numbers, subnetting and CIDR, DNS, DHCP and ARP, and IPv6 basics.

50 cards
Beginner

Cyber security

Cyber security flashcards: the CIA triad, phishing, XSS, CSRF, SQL injection, MITM, hashing vs encryption, TLS, MFA, least privilege, OWASP and zero trust.

50 cards
Beginner

Docker

Learn Docker from images and layers to multi-stage builds, volumes, networks and Compose, with the commands and best practices you use daily.

50 cards
Intermediate

Kubernetes

Kubernetes fundamentals for developers and CKA or CKAD candidates: Pods, Deployments, Services, storage, probes, resources and scheduling, plus the kubectl commands you use daily.

50 cards
Beginner

AWS

AWS flashcards: regions and AZs, EC2, S3 storage classes, IAM users, roles and policies, VPC networking, RDS, Lambda, CloudWatch and Route 53.

50 cards
Beginner

Terraform

Terraform flashcards: HCL, providers, resources, variables and outputs, state and remote backends, plan and apply, modules, count, for_each, drift and import.

50 cards