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%

From Desktop User to System Operator

Download as PDF

Unix philosophy, everything-is-a-file, the filesystem hierarchy properly, and reading documentation seriously.
Linux+ XK0-0061.0 System ManagementFoundational

1. What changes at this level

You finished the beginner course able to use Linux Mint. This course is about operating it. Three things shift, and it is worth naming them now because they explain why the material feels different.

Beginner courseThis course
Primary toolThe graphical tool, with the command mentionedThe command line, with graphical tools noted where genuinely better
ScopeLinux MintLinux, demonstrated on Mint - most of it is Debian and Ubuntu knowledge
Question answeredWhat do I click?Why does it work that way?

That third shift is the important one. Procedures only cover situations someone anticipated. Mechanism lets you handle situations nobody anticipated - which is most of them.

2. The Unix philosophy, and why it matters practically Any Linux

Linux inherits a design philosophy from Unix, articulated in the 1970s and still visible in every command you will meet. Stated plainly:

  • Write programs that do one thing and do it well. sort sorts. It does not search, count or format.
  • Write programs to work together. The output of one becomes the input of the next.
  • Write programs to handle text streams, because that is a universal interface.

This is not history. It is the reason Module 3 exists and the reason a handful of small tools can answer questions no single program was written to answer.

A concrete illustration. Nobody wrote a program called "list the ten commands I use most often". But history produces text, awk extracts a column from text, sort orders text, uniq -c counts repeats, and head takes the first few lines. Five small tools, composed in one line, answer a question none of them knows about. That is the philosophy paying off.
bash
$ history | awk '{print $2}' | sort | uniq -c | sort -rn | head -5
    412 cd
    287 ls
    193 git
    154 sudo
     98 nano
you are not expected to understand this yet - Module 3 builds it piece by piece

3. "Everything is a file" Any Linux

You will hear this constantly. It means that a great many things which are not files in any ordinary sense are nonetheless presented as files, so that the same small set of operations - open, read, write, close - works on all of them.

PathWhat it actually isWhat that buys you
/home/you/notes.txtAn ordinary fileThe baseline case
/dev/sdaYour entire hard disk, as a stream of bytesDisk imaging becomes a copy operation
/dev/nullA sink that discards everything written to itSilencing unwanted output
/dev/zeroAn endless supply of zero bytesCreating blank files of a given size
/dev/urandomAn endless supply of random bytesGenerating keys and passwords
/proc/cpuinfoLive kernel data about your processor, rendered as textReading system state with cat
/proc/1234/statusLive state of process 1234Inspecting a running program with ordinary tools
/sys/class/power_supply/BAT0/capacityYour battery percentageScripting against hardware without special libraries
bash
$ cat /sys/class/power_supply/BAT0/capacity
87
$ grep 'model name' /proc/cpuinfo | head -1
model name : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
no special tool required - these are readable because they look like files

The payoff is uniformity. You do not need a battery API, a CPU-information library and a process-inspection utility. You need cat, and everything is legible to the same tools.

4. The filesystem hierarchy, properly Any Linux

The beginner course gave you the tour. Now the distinctions that actually matter when you are deciding where something belongs or working out where a file came from.

/bin, /sbin, /lib ← now symlinks into /usr - see the note below /usr/bin ← commands from packages, managed by APT. Do not edit by hand /usr/sbin ← commands intended for administrators /usr/lib ← shared libraries for the above /usr/share ← architecture-independent data: docs, icons, manual pages /usr/local ← software YOU installed outside the package manager. APT never touches this /opt ← self-contained third-party packages, each in its own directory /etc ← configuration for this machine. Text files. Back this up /var/log ← logs /var/lib ← state that persists: package database, databases, service data /var/cache ← regenerable cached data, including downloaded .deb files /run ← runtime state since boot. In memory, vanishes on reboot /tmp ← temporary files, cleared periodically and on reboot /srv ← data served by this machine, e.g. a web root. Often empty on a desktop /proc, /sys ← not real files - kernel interfaces, as in section 3
The three distinctions worth memorising
/usr/bin vs /usr/local/binPackage manager territory versus yours. If you compile something yourself, it belongs in /usr/local, where an APT upgrade will never overwrite it.
/etc vs /var/libConfiguration you write versus state the system maintains. Back up /etc; you generally cannot usefully hand-edit /var/lib.
/tmp vs /var/tmp vs /run/tmp clears on reboot. /var/tmp survives reboots. /run lives in memory and never touches disk.
Why /bin is now a symlink. Historically /bin held commands needed before /usr was mounted, and /usr/bin held everything else. Modern systems mount /usr during early boot via the initramfs, so the split no longer serves a purpose. Debian and Ubuntu completed the "usr merge", making /bin a symbolic link to /usr/bin. Both paths therefore work and refer to the same place - which is why ls -l / shows arrows where you might expect directories.

5. Kernel space and user space Any Linux

Memory is divided into two privilege domains, enforced by the processor itself.

Your applicationsFirefox, bash, your scripts - user space
System libraries (glibc)Convenient wrappers around system calls
System call interfaceThe only doorway between the two domains
The kernelScheduling, memory, filesystems, drivers - kernel space
Figure 1.1 - Applications cannot touch hardware directly. Every such request passes through the system call interface.

A system call is a request from user space for the kernel to do something privileged: open a file, allocate memory, send a network packet, create a process. When your script runs cat notes.txt, the program issues open(), then read(), then write(), then close(). Everything else is arrangement around those.

Three practical consequences follow, and they explain things you have already seen:

  • A crashing application cannot take the system down with it, because it never had access to kernel memory. A crashing kernel is a different matter - that is a kernel panic.
  • Permission checks happen in the kernel, at the system call. This is why permissions cannot be bypassed by a clever program, and why they are meaningless once someone can boot a different kernel from a USB stick.
  • A new kernel requires a reboot, because it is the layer everything else is already running on top of.

6. The three layers of your system, revisited Debian family

Beginner Module 1 established that Mint is built on Ubuntu, which is built on Debian. Now the operationally useful version: which layer does a given thing on your machine actually come from?

LayerContributesYou will meet it as
DebianThe packaging system, the directory conventions, the vast majority of software, the policy manual that governs how packages behavedpkg, apt, /etc conventions, update-alternatives, most manual pages
UbuntuThe specific package versions in your release, hardware enablement, the kernel you run, extra repositoriesYour kernel version, universe and multiverse repositories, most package versions
Linux MintCinnamon, the X-Apps, Update Manager, Timeshift, Software Sources, Driver Manager, mintupgrade, the Snap blockAnything beginning with mint, and the tools you met in the beginner course
A test you can run for yourself. apt policy <package> shows which repository a package came from. Try it on timeshift and then on coreutils - one is Mint's, the other has been in Debian for decades. Module 8 covers this command properly, but it is worth seeing now: it makes the three layers visible rather than theoretical.

7. Reading documentation seriously Any Linux

You are expected to look things up. Doing that well is a skill, and the manual system rewards understanding its structure.

One name, two different manual pages man -f passwd passwd(1) the command that changes your password: man 1 passwd passwd(5) the format of the file /etc/passwd: man 5 passwd 1 user commands2 system calls3 library functions5 file formats7 overviews8 admin commands Plain man passwd shows section 1. To understand the file, ask for section 5.
Figure 1.2 Manual sections. The same name can have pages in several sections, and knowing which section you need is the difference between reading about a command and reading about the file it edits.
Manual sections

The manual is divided into numbered sections, and the same name can appear in more than one. This trips up almost everyone at some point.

SectionContainsExample
1User commandsman 1 passwd - the command that changes your password
2System callsman 2 open
3Library functionsman 3 printf
5File formatsman 5 passwd - the format of /etc/passwd
7Conventions and overviewsman 7 hier - the filesystem hierarchy itself
8Administration commandsman 8 mount

Plain man passwd gives you section 1 - the command. If you are trying to understand the file, you need man 5 passwd. Two entirely different documents behind one name.

bash
$ man -f passwd
passwd (1)           - change user password
passwd (5)           - the password file
-f (or 'whatis') lists every section containing that name
$ man -k 'list directory'
dir (1)              - list directory contents
ls (1)               - list directory contents
-k (or 'apropos') searches descriptions when you don't know the command's name
Navigating a manual page

Manual pages open in less, so: arrows and Space to scroll, / to search forward, n for the next match, g and G for start and end, q to quit. Searching with / for the exact option you want - for example /--exclude - is far faster than scrolling.

Where else to look
SourceUse it for
cmd --helpA quick reminder of options. Usually enough.
man cmdAuthoritative and complete, for the version you actually have installed.
info cmdSome GNU tools have far fuller info documentation than their manual page.
/usr/share/doc/<package>/Changelogs, README files, example configurations shipped with the package.
The Debian Administrator's HandbookFree, thorough, and applies directly to Mint through the Debian layer.
man 7 hierThe filesystem hierarchy, documented on your own machine.
Why the local manual beats a search engine for options. A search result describes some version of a tool on some distribution. man describes the exact version installed on the machine in front of you. When an option in a blog post does not work, the manual page is usually the reason - and the answer.