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:

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:

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:

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:

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:

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:

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:

Before a storage device can be used, it must usually be formatted with a filesystem.

Common Linux filesystems include:

Linux can also read and, in many cases, write filesystems used by other operating systems, including:

Different filesystems emphasize different goals such as:

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:

The newly created process is called the:

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:

Child processes commonly inherit:

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:

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:

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:

Many daemon names end with the letter:


d

Examples:


sshd
cupsd
systemd

Daemons commonly:

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:

Display memory and swap usage:


free -h

Display active swap devices:


swapon --show

Swap helps:

Heavy swap usage may produce:

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:

Another example:


ps aux | grep firefox

Here:


firefox

Pipes support:

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:

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:

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:

Common examples include:

Display all environment variables:


printenv

Display one specific variable:


echo $HOME

Environment variables help programs determine:

They are heavily used in:


A.15 — SSH Sessions

SSH stands for:


Secure Shell

SSH provides encrypted remote access to another computer across a network.

Using SSH, you can:

Connect to another system:


ssh username@hostname

Example:


ssh norm@BOX3

or:


ssh norm@192.168.1.50

After connecting:

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.