Linux Mastery
The Human Knowledge Project
Appendix A — Core Linux Concepts
Purpose of This Appendix
Throughout Linux Mastery, many important concepts were introduced while learning commands and practical skills.
This appendix gathers several foundational Linux concepts into one place for quick reference and deeper understanding.
Unlike the main chapters, these topics are intended as concise explanations rather than step-by-step lessons.
You are not expected to memorize everything here.
Instead, return to these sections whenever you encounter these ideas during your continued study of Linux.
A.1 — Journaling
Modern Linux filesystems often use journaling.
A journal records intended filesystem changes before they are written to disk.
If power is lost or the system crashes during a write operation, the journal helps the filesystem recover to a consistent state.
Rather than leaving the filesystem partially updated, Linux can replay or discard incomplete operations during the next boot.
This greatly reduces the likelihood of filesystem corruption.
Common journaling filesystems include:
- ext4
- XFS
- Btrfs
THKI Insight
Journaling does not prevent hardware failure or replace backups.
Its purpose is to help preserve filesystem consistency after unexpected interruptions.
A.2 — Recursion
Recursion means performing the same operation repeatedly through nested levels.
Many Linux commands operate recursively, automatically entering subdirectories and processing everything beneath them.
Example:
ls -R
The -R option means:
recursive
The command displays:
- the current directory
- each subdirectory
- every directory beneath those
- continuing until the entire directory tree has been explored
Many Linux commands support recursive operation.
Examples include:
ls -R
cp -R
rm -R
chmod -R
Recursive commands are extremely powerful because they can affect hundreds or thousands of files with a single command.
Always verify the path before using recursive operations, especially when deleting or changing permissions.
A.3 — TTY
The term TTY originally referred to mechanical teletypes connected to early computers.
Although modern systems no longer use teletypes, Linux continues to use the name for terminal devices.
Display your current terminal:
tty
Example output:
/dev/pts/0
Linux represents terminals as device files.
Examples include:
Virtual consoles:
/dev/tty1
/dev/tty2
Pseudo-terminals:
/dev/pts/0
TTYs are closely connected to:
- shells
- terminals
- login sessions
- process input and output
Understanding TTYs helps explain how Linux manages interactive sessions.
A.4 — Canonical Mode
Canonical mode is the normal way terminals receive keyboard input.
In canonical mode:
- characters are buffered
- editing keys such as Backspace work normally
- pressing Enter submits the completed line
This is why most terminal commands wait until you press Enter before processing input.
Some interactive programs temporarily switch to non-canonical mode, allowing each keystroke to be processed immediately.
Examples include:
vimtop- many games
- text-based user interfaces
Non-canonical mode makes interactive applications feel responsive while canonical mode is ideal for ordinary command-line work.
A.5 — Formatting
Much of the Linux world relies on simple, durable text formats.
Documentation is commonly written using plain text or Markdown.
Examples include:
# Heading
*italic*
**bold**
Plain-text formats are valued because they are:
- portable
- lightweight
- easy to version-control
- readable for decades
- supported on virtually every operating system
This emphasis on simple text reflects one of Linux's enduring design philosophies: use formats that remain accessible over time.
A.6 — Filesystems
A filesystem determines how data is organized and stored on a storage device.
It defines:
- how files are named
- how directories are organized
- how permissions are stored
- how free space is tracked
- how metadata is managed
Before a storage device can be used, it must usually be formatted with a filesystem.
Common Linux filesystems include:
- ext4
- XFS
- Btrfs
Linux can also read and, in many cases, write filesystems used by other operating systems, including:
- NTFS
- FAT32
- exFAT
Different filesystems emphasize different goals such as:
- performance
- reliability
- compatibility
- scalability
- snapshots
Filesystem design is one of the deepest and most important areas of operating system engineering.
THKI Insight
A hard drive stores raw data.
The filesystem gives that data structure and organization.
A.7 — Parent and Child Processes
Linux programs often create other programs.
When one process starts another, a parent-child relationship is formed.
The original process is called the:
- parent process
The newly created process is called the:
- child process
For example, when a shell executes:
ls
the shell typically creates a child process to run the command.
This creates a hierarchy known as a process tree.
Display a process tree with:
pstree
Conceptually:
bash
├── firefox
├── xed
└── ls
In this example:
bashis the parent- the other programs are child processes
Child processes commonly inherit:
- environment variables
- permissions
- current working directory
- open files
- terminal connections
Linux systems are built upon enormous trees of parent and child processes that begin during system startup.
A.8 — The Linux Scheduler
Modern Linux systems often run hundreds—or even thousands—of processes.
The scheduler determines:
- which process runs
- when it runs
- how long it runs
- which CPU core executes it
Although a CPU executes only a limited number of instructions at any instant, Linux switches between processes so rapidly that many programs appear to run simultaneously.
The scheduler attempts to balance:
- responsiveness
- fairness
- throughput
- overall system efficiency
Interactive applications usually receive fast response times, while background tasks use processor time whenever resources are available.
Linux scheduling is one reason the operating system performs so well under heavy multitasking workloads.
A.9 — Daemons
A daemon is a background process that provides ongoing system services.
Unlike interactive programs, daemons usually operate without direct user involvement.
Examples include:
- networking
- printing
- audio
- remote access
- scheduling
- device management
Many daemon names end with the letter:
d
Examples:
sshd
cupsd
systemd
Daemons commonly:
- start automatically during boot
- wait for requests or events
- continue running for long periods
- provide services to users and applications
Most Linux systems rely heavily on daemons for normal operation.
Without them, networking, printing, sound, and many other services would not function.
A.10 — Swap Memory
Swap is disk space that Linux may use as overflow memory when physical RAM becomes heavily utilized.
RAM is extremely fast.
Swap is much slower because it usually resides on an SSD or hard drive.
When memory pressure increases, Linux may temporarily move less-active memory pages into swap.
This process is called:
- swapping
- paging
Display memory and swap usage:
free -h
Display active swap devices:
swapon --show
Swap helps:
- prevent crashes
- absorb temporary memory spikes
- improve multitasking
- support hibernation on some systems
Heavy swap usage may produce:
- sluggish performance
- pauses
- excessive disk activity
This condition is often called:
swap thrashing
Small amounts of swap usage are perfectly normal and do not necessarily indicate a problem.
A.11 — Pipes
One of the defining ideas in Unix and Linux is that small programs can work together.
A pipe sends the output of one command directly into another command.
The pipe symbol is:
|
Example:
ls | less
In this example:
lsproduces a directory listing- the pipe transfers that output
lessdisplays it one screen at a time
Another example:
ps aux | grep firefox
Here:
ps auxlists running processesgrepfilters the list to show only processes containing the word:
firefox
Pipes support:
- filtering
- searching
- sorting
- automation
- scripting
THKI Insight
Pipes are one of the greatest innovations in Unix and Linux.
Rather than creating enormous all-in-one programs, Linux encourages many small programs that cooperate through text streams.
A.12 — Inodes
Internally, Linux filesystems identify files using structures called inodes.
An inode stores information such as:
- ownership
- permissions
- timestamps
- file size
- disk block locations
One thing an inode does not normally store is the filename itself.
Directory entries associate filenames with inode numbers.
Display inode numbers:
ls -i
Because filenames and inodes are separate, multiple filenames may reference the same inode through hard links.
Understanding inodes helps explain many Linux filesystem behaviors.
A.13 — Signals
Processes communicate using signals.
Signals allow one process—or the operating system—to notify another process that some action should occur.
Signals are commonly used to:
- interrupt programs
- terminate processes
- pause execution
- resume execution
- respond to system events
Pressing:
Ctrl + C
usually sends:
SIGINT
To send a signal manually:
kill PID
Common signals include:
| Signal | Purpose |
|---------|---------|
| SIGINT | Interrupt a running program |
| SIGTERM | Request graceful termination |
| SIGKILL | Force immediate termination |
| SIGSTOP | Pause a process |
| SIGCONT | Resume a paused process |
Signals form one of the fundamental communication mechanisms within Linux.
A.14 — Environment Variables
Environment variables store information used by:
- shells
- programs
- scripts
- system processes
Common examples include:
HOMEPATHUSERSHELLPWD
Display all environment variables:
printenv
Display one specific variable:
echo $HOME
Environment variables help programs determine:
- where files are located
- which user is running the program
- which shell is active
- how commands should behave
They are heavily used in:
- scripting
- programming
- automation
- system configuration
A.15 — SSH Sessions
SSH stands for:
Secure Shell
SSH provides encrypted remote access to another computer across a network.
Using SSH, you can:
- open a remote terminal
- execute commands
- administer servers
- transfer files securely
Connect to another system:
ssh username@hostname
Example:
ssh norm@BOX3
or:
ssh norm@192.168.1.50
After connecting:
- the remote shell appears in your terminal
- commands execute on the remote computer
- all communication is encrypted
SSH has become one of the foundational technologies of modern Linux administration.
Many Linux servers operate for years without a monitor or keyboard attached, managed entirely through SSH.
Persistent terminal tools such as:
tmux
screen
allow long-running remote sessions to continue even if the network connection is interrupted.
Using This Reference
As your Linux experience grows, you'll find yourself returning to these concepts repeatedly.
Many of the ideas presented here—such as processes, signals, inodes, scheduling, and environment variables—form the foundation upon which more advanced Linux topics are built.
Do not worry about mastering every detail today.
Understanding develops naturally through continued practice, experimentation, and real-world experience.
Appendix A is intended to serve as a convenient reference whenever you need a concise explanation of one of Linux's core concepts.