askesis

Intermediate Linux filesystem: 50 paths admins use daily

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.

IT & DevOpsIntermediate50 cardsFree

Practice now

Study without an account

0 of 50 seen0 graduated
What is /sys for?

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

All 50 cards

  1. 1
    What is /sys for?
    A virtual filesystem (sysfs) that exposes devices, drivers and kernel settings as files.
    udev uses it to create the device files in /dev.
  2. 2
    What is /run for?
    Runtime data since the last boot: PID files, sockets, lock files. Emptied at every boot.
    Added in FHS 3.0; /var/run is now a symlink to it.
  3. 3
    What is /srv for?
    Data this system serves to others, such as web or FTP sites.
    Many distributions still put web content in /var/www by default.
  4. 4
    What is /usr/bin for?
    Most user commands installed by the distribution’s packages.
    Not administrative commands: those are in /usr/sbin.
  5. 5
    What is /usr/sbin for?
    Most system administration commands and daemons installed by packages (useradd, sshd).
  6. 6
    What is /usr/lib for?
    The libraries (and internal program files) for the programs in /usr/bin and /usr/sbin.
  7. 7
    What is /usr/local for?
    Software the administrator compiles or installs by hand, outside the package manager (the third hierarchy).
    The package manager never touches it. /usr/local/bin is the place for your own scripts for all users.
  8. 8
    What is /usr/share for?
    Architecture-independent data: documentation, man pages, icons, locales, time zones.
  9. 9
    What is /var/cache for?
    Cached data that can be deleted and regenerated, e.g. downloaded packages (/var/cache/apt).
  10. 10
    What is /var/lib for?
    Programs’ persistent state: package databases, database files.
    e.g. /var/lib/dpkg, /var/lib/rpm, /var/lib/mysql.
  11. 11
    What is /var/tmp for?
    Temporary files that must survive a reboot.
    Contrast /tmp, which may be emptied at boot.
  12. 12
    What is /etc/skel for?
    Template files copied into every new user’s home directory when the account is created.
    Typically .bashrc, .bash_profile (or .profile) and .bash_logout.
  13. 13
    What is /etc/sudoers?
    The rules for who may run which commands with sudo.
    Edit it only with visudo, which checks the syntax before saving.
  14. 14
    What is /etc/profile?
    The system-wide startup script that every login shell runs.
    It also runs the scripts in /etc/profile.d/.
  15. 15
    What is ~/.bash_profile?
    Your personal login-shell startup file, for environment variables set once at login.
    Only the first that exists of ~/.bash_profile, ~/.bash_login and ~/.profile is read.
  16. 16
    What is ~/.bash_history?
    Your saved command history, written when the shell exits.
    HISTFILESIZE sets how many lines it keeps.
  17. 17
    What is /etc/resolv.conf?
    The DNS servers to query (nameserver lines) and the search domains.
    Often generated by systemd-resolved or NetworkManager rather than edited by hand.
  18. 18
    What is /etc/ssh/sshd_config?
    The configuration of the SSH server, sshd.
    Mind the d: ssh_config is the client. Restart sshd after editing.
  19. 19
    What is ~/.ssh/authorized_keys?
    The public keys allowed to log in to this account.
    ssh-copy-id appends your key to it on the server.
  20. 20
    What is ~/.ssh/known_hosts?
    The host keys of servers you’ve connected to, used to detect an impostor.
  21. 21
    What is /etc/crontab?
    The system-wide crontab, with a user field on each line.
    Users’ own crontabs (crontab -e) have no user field.
  22. 22
    What is /etc/apt/sources.list?
    The package repositories APT uses on Debian/Ubuntu.
    More repositories go in /etc/apt/sources.list.d/.
  23. 23
    What is /etc/os-release?
    The distribution’s name and version (NAME, VERSION_ID, PRETTY_NAME).
  24. 24
    What is /proc/cpuinfo?
    Details of each processor: model, cores, flags.
  25. 25
    What is /proc/meminfo?
    Detailed memory statistics: total, free, available, swap.
    free reads its numbers from here.
  26. 26
    Which virtual filesystem (sysfs) exposes devices, drivers and kernel objects as files?
    /sys
    udev uses it to create the device files in /dev.
  27. 27
    Which directory holds runtime data such as PID files and sockets, and is emptied at every boot?
    /run
    Added in FHS 3.0; /var/run is now a symlink to it.
  28. 28
    Which directory is meant for the data a system serves, such as web or FTP sites?
    /srv
    Many distributions still put web content in /var/www by default.
  29. 29
    Which directory holds most user commands installed by packages (not just the essential ones)?
    /usr/bin
    Not administrative commands: those are in /usr/sbin.
  30. 30
    Which directory holds most system administration commands and daemons installed by packages?
    /usr/sbin
  31. 31
    Which directory holds the shared libraries for most installed programs?
    /usr/lib
  32. 32
    Where does software go that the administrator compiles or installs by hand, outside the package manager?
    /usr/local
    The package manager never touches it. /usr/local/bin is the place for your own scripts for all users.
  33. 33
    Which directory holds architecture-independent shared data such as man pages, docs and icons?
    /usr/share
  34. 34
    Which directory holds application caches that can be deleted and rebuilt, such as downloaded packages?
    /var/cache
  35. 35
    Which directory holds programs’ persistent state, such as the package manager’s database?
    /var/lib
    e.g. /var/lib/dpkg, /var/lib/rpm, /var/lib/mysql.
  36. 36
    Which temporary directory keeps its files across reboots?
    /var/tmp
    Contrast /tmp, which may be emptied at boot.
  37. 37
    Which directory’s contents are copied into a new user’s home directory?
    /etc/skel
    Typically .bashrc, .bash_profile (or .profile) and .bash_logout.
  38. 38
    Which file defines who may use sudo, and for which commands?
    /etc/sudoers
    Edit it only with visudo, which checks the syntax before saving.
  39. 39
    Which system-wide file does every login shell run at startup?
    /etc/profile
    It also runs the scripts in /etc/profile.d/.
  40. 40
    Which personal file does a Bash login shell read first, if it exists?
    ~/.bash_profile
    Only the first that exists of ~/.bash_profile, ~/.bash_login and ~/.profile is read.
  41. 41
    Which file stores your Bash command history between sessions?
    ~/.bash_history
    HISTFILESIZE sets how many lines it keeps.
  42. 42
    Which file lists the DNS servers the system queries?
    /etc/resolv.conf
    Often generated by systemd-resolved or NetworkManager rather than edited by hand.
  43. 43
    Which file configures the SSH server?
    /etc/ssh/sshd_config
    Mind the d: ssh_config is the client. Restart sshd after editing.
  44. 44
    Which file lists the public keys allowed to log in as a user?
    ~/.ssh/authorized_keys
    ssh-copy-id appends your key to it on the server.
  45. 45
    Which file stores the host keys of the SSH servers you’ve already connected to?
    ~/.ssh/known_hosts
  46. 46
    Which system crontab file has a user field on each line?
    /etc/crontab
    Users’ own crontabs (crontab -e) have no user field.
  47. 47
    On Debian/Ubuntu, which file lists the package repositories APT uses?
    /etc/apt/sources.list
    More repositories go in /etc/apt/sources.list.d/.
  48. 48
    Which file identifies the distribution and its version?
    /etc/os-release
  49. 49
    Which virtual file shows details about the processors?
    /proc/cpuinfo
  50. 50
    Which virtual file shows detailed memory statistics?
    /proc/meminfo
    free reads its numbers from here.

Frequently asked questions

Is this deck aimed at LPIC-1?

It follows the LPIC-1 objectives on the filesystem hierarchy and system files, but everything in it applies to any Linux distribution you administer.

Which distributions does it cover?

The layout is the same everywhere. Where Debian and Red Hat families differ, such as package sources, the card says so.

Should I do the basics deck first?

If /etc, /var and /usr are already familiar, start here. Otherwise the basics deck covers the top-level directories this one builds on.

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
Advanced

Advanced Linux filesystem

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.

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