Demo mode This site is not live. It is currently being tested and developed. Nothing on here represents an offer.
← Exit course IT-202 Linux Command Line and System Administration
Course progress, 0 of 14 parts done0%

Flash cards

Download as PDF

  1. What three shifts separate operating Linux from simply using Linux Mint?

    Show the answer

    The command line first, Linux rather than just Mint, and mechanism rather than procedure. Procedures cover only the situations someone anticipated, while mechanism lets you handle the ones nobody did.

  2. What are the three rules of the Unix philosophy?

    Show the answer

    Write programs that do one thing and do it well, write programs to work together so one's output is the next one's input, and write programs to handle text streams, because text is a universal interface.

  3. What does history | awk '{print $2}' | sort | uniq -c | sort -rn | head -5 show, and what does it prove?

    Show the answer

    The five commands you use most often, with how often you used each. No program was written to do that: five small tools composed in one line answer it, which is the Unix philosophy paying off.

  4. What does "everything is a file" mean in Linux?

    Show the answer

    Many things that are not ordinary files, such as disks, kernel data and process state, are presented as files. The same operations, open, read, write and close, then work on all of them, so cat and grep can read them.

  5. What do /dev/null, /dev/zero and /dev/urandom do?

    Show the answer

    /dev/null discards everything written to it. /dev/zero supplies endless zero bytes, used to make blank files of a given size. /dev/urandom supplies endless random bytes, used for keys and passwords.

  6. What are /proc and /sys?

    Show the answer

    Not real files but kernel interfaces that show live system state as text. For example /proc/cpuinfo describes the processor and /sys/class/power_supply/BAT0/capacity gives the battery percentage, readable with cat.

  7. What is the difference between /usr/bin and /usr/local/bin?

    Show the answer

    /usr/bin is the package manager's territory, so do not edit it by hand. /usr/local is yours: software you compile yourself belongs there, where an APT upgrade will never overwrite it.

  8. What is the difference between /etc and /var/lib?

    Show the answer

    /etc holds the configuration you write for this machine, as text files, so back it up. /var/lib holds state the system maintains, such as the package database and service data, which you generally cannot usefully hand-edit.

  9. How do /tmp, /var/tmp and /run differ?

    Show the answer

    /tmp is cleared on reboot. /var/tmp survives reboots. /run holds runtime state since boot in memory and never touches the disk.

  10. Why is /bin now a symbolic link to /usr/bin, and how do you prove /bin/ls and /usr/bin/ls are one file?

    Show the answer

    The usr merge: /bin once held commands needed before /usr was mounted, but /usr is now mounted in early boot by the initramfs. ls -i shows both paths with the same inode number, so they are one file reachable by two paths.

  11. What is a system call?

    Show the answer

    A request from user space for the kernel to do something privileged, such as open a file, allocate memory, send a network packet or create a process. It is the only doorway between user space and kernel space.

  12. Why can a crashing application not take the whole system down, when a crashing kernel can?

    Show the answer

    The processor keeps applications in user space with no access to kernel memory, so their crash is contained. A crashing kernel takes everything with it, which is a kernel panic.

  13. Why can no clever program bypass file permissions, yet permissions mean nothing to someone who boots another kernel from a USB stick?

    Show the answer

    Permission checks happen in the kernel, at the system call. A different kernel booted from USB does not enforce your system's checks.

  14. Why does installing a new kernel require a reboot?

    Show the answer

    The kernel is the layer everything else is already running on top of, so it cannot be swapped while the system runs.

  15. What does each layer of Linux Mint contribute: Debian, Ubuntu and Mint?

    Show the answer

    Debian gives the packaging system, directory conventions and most software. Ubuntu gives the package versions in your release, hardware enablement and the kernel. Mint gives Cinnamon and its own tools, such as Update Manager and Timeshift.

  16. Which command shows which repository a package came from?

    Show the answer

    apt policy followed by the package name. Read the hostname in the source line: timeshift comes from packages.linuxmint.com, so it is Mint's own, while grep comes from the Ubuntu archive.

  17. Which manual sections hold user commands, file formats and administration commands, and what is the difference between man passwd and man 5 passwd?

    Show the answer

    Section 1 holds user commands, section 5 file formats and section 8 administration commands. man passwd opens section 1, the command, while man 5 passwd describes the format of /etc/passwd.

  18. What is the difference between man -f and man -k?

    Show the answer

    man -f, or whatis, lists every manual section holding a given name. man -k, or apropos, searches the descriptions when you do not know the command's name.

  19. Why is the local manual a better guide to a command's options than a search engine?

    Show the answer

    man describes the exact version installed on the machine in front of you, while a search result describes some version on some distribution. When an option from a blog post fails, the manual page usually shows why.