Linux Foundations (Beginner): How Linux Really Works – Not Just Commands

Most beginners learn Linux backwards.

They start with commands – ls, cd, chmod, sudo – and hope that eventually the system will “make sense.” But Linux only makes sense when you understand how it actually works under the hood.

This guide gives you the mental model that every engineer needs. No memorization. No cheat-sheet culture. Just clarity.

What Is Linux (and What It Isn’t)

Linux is an operating system kernel, created by Linus Torvalds in 1991.

Kernel: The kernel is the core of the operating system that:

  • Handles hardware devices
  • Controls memory (RAM)
  • Manages CPU processes
  • Security
  • Filesystems
  • Provides system calls for applications

It is the “brain” that everything else depends on.

User Space: This is Everything outside the kernel.

  • Shells (bash, zsh, fish)
  • Applications
  • System utilities
  • Desktop environments

When you type a command, you’re interacting with user space, which then interacts with the kernel.

Linux + GNU = A Complete Operating System

Linux alone is not usable. A full system combines:

  • Linux kernel

  • GNU utilities (bash, coreutils, grep, awk, etc.)

  • System libraries

  • Package manager

  • Optional desktop environment

This is why most systems are correctly called GNU/Linux.

GNU in Linux is the essential collection of free software tools (like compilers, shells, and utilities) that, when combined with the Linux kernel, form the complete operating system known as GNU/Linux, which powers most Linux distributions, providing the userland environment for the kernel to run.

Linux is the kernel (the core resource manager), while GNU provides the rest of the operating system’s familiar applications and libraries, creating a fully functional system.

Linux Distributions (Distros)

A Linux distribution is a packaged operating system built around the Linux kernel, bundled with:

  • System utilities

  • Package manager

  • Default configuration

  • Desktop or server focus

All distros share the same kernel concept but differ in package management, defaults, release models, and philosophy.

Common Linux Distribution Families

🔹 Debian-Based

Examples:

  • Ubuntu

  • Linux Mint

  • Debian

Characteristics:

  • Uses APT package manager

  • .deb packages

  • Strong stability

  • Widely used in servers and cloud

Used heavily in:

  • Cloud VMs

  • Containers

  • Enterprise environments

🔹 Red Hat-Based

Examples:

  • RHEL

  • Rocky Linux

  • AlmaLinux

  • Fedora

Characteristics:

  • Uses DNF/YUM

  • .rpm packages

  • Enterprise-focused

  • Common in corporate data centers

🔹 Arch-Based

Examples:

  • Arch Linux

  • Manjaro

Characteristics:

  • Rolling release

  • Minimal by default

  • Manual configuration

  • Best for learning internals deeply

Important Truth

If you understand one Linux system well, you can work on any Linux system.

The core concepts do not change.

Terminal Basics – What the Terminal Actually Is

The terminal is a text-based interface that allows users to communicate directly with the operating system using a shell.
A shell interprets commands and communicates with the kernel.

Common shells:

  • Bash (Bourne Again Shell) – default on most systems

  • Zsh (Z Shell)

  • Sh (Bourne Shell)

Prompt example:

user@server:/home/user$
  • user → logged-in user

  • server → hostname

  • /home/user → current directory

  • $ → normal user

  • # → root (administrator)

What Actually Happens When You Run a Command

This is the part nobody explains, but it’s the key to understanding Linux.

Let’s say you type:

ls -l /home

Here’s the real sequence:

1. The Shell Reads Your Input

The shell (Bash, Zsh, etc.) receives your text.

2. The Shell Parses and Expands

It interprets:

  • Variables
  • Wildcards
  • Quotes
  • Aliases
  • Functions

3. The Shell Locates the Program

It searches through $PATH to find the ls binary.

4. The Shell Requests the Kernel to Execute It

The shell uses a system call (execve) to ask the kernel to run the program.

5. The Kernel Creates a Process

The kernel:

  • Allocates memory
  • Assigns a PID
  • Schedules CPU time

6. The Program Runs and Produces Output

ls reads the directory and prints results.

7. The Shell Waits, Then Returns Control

Once the process ends, the shell is ready for the next command.

This lifecycle explains why Linux feels predictable once you understand the flow.

Understanding Commands, Options, and Arguments

Every Linux command follows this structure: Command [options] [arguments], which means the command is compulsory. Options and arguments are optional. They add and remove information to and from the output. They allow us to format the output in a specific manner. Let’s break it down.

Commands

Commands are the actions you want Linux to perform. When we hit the Enter key after typing a word on the command prompt, the shell interprets it as a command. It finds a file or a script matching the typed word in predefined directories. To view the predefined directories, use the following command.

$echo $PATH

If it finds a matching script, it executes the script. If not, it returns the error message command not found. Let us take an example. Execute the following commands on the command prompt.

$ls
$list

The shell has a script file named ls, but it does not have any file or script named list. Since it has a script file named ls, it executes the first command and returns an error for the second command.

Options

Options modify the default behavior of the command. They are optional. They are also known as switches. There are three ways to specify options for the command. These are without a hyphen sign, with a single hyphen sign and with double hyphen signs.
The following are examples of these methods.

$ls
$ls -l
$ls --inode

By default, the ls command lists the contents of the current directory.
In the first command, we did not use any option. So, it displayed all the contents of the current directory

In the second command, we used the -l option. It is an example of a single hyphen sign option. When we use it, the ls command displays contents with their properties in a list format.

In the third command, we used the --inode option. It is an example of a double hyphen sign option. When we use this option, the ls command displays the inode number and its contents.

Arguments

Arguments are the input of the command. Everything we specify after the command is an argument (including options). Technically, all options are arguments. But all arguments are not options.

Options only modify and format the output. They do not control or specify a target for the command. Arguments do these. For example, the ls command shows the names of all the contents available in the current directory. If we use an option with it, the option modifies the output. For example, if we use the -l option, it displays the names in the listing format with other properties. No option can force the ls command to display contents from another directory. An argument does this job. If we specify a directory with this command as an argument, it shows the contents of that directory instead of the current directory.

$ls
$ls data
$ls -l data

The first command displays the contents of the current directory. This command does not use any option or argument.

The second command uses one argument. We specified the data directory’s name as an argument. If we specify the target directory, the ls command displays the content of the specified directory.

The third command uses one argument and one option. The option instructs the command to display the output in the list format with detailed information. The argument instructs the command to display the content of the specified directory instead of the current directory.

In Conclusion: Options and arguments allow us to control the command’s output. Options format the output. Arguments control the command. They instruct the command to include additional information in the output.

Linux File System Hierarchy (FSH)

Linux uses one directory tree, starting at  / (root). There are no drive letters like Windows.

Directory Purpose
/ Root of everything (Everything starts here)
/bin Essential user commands.

Examples: ls, cp, mv, cat

Required for system boot.

/sbin System admin commands.

Examples: ip, mount, reboot

Intended for administrators

/etc System Configuration files

Text-based

Examples:

  • /etc/passwd

  • /etc/hosts

  • /etc/ssh/sshd_config

Rule:

No binaries here. Configuration only.

/home User home directories

Example: /home/victor

Personal files, downloads, configs

/var Variable data (logs, caches, queues)

Example:

  • /var/log/syslog

  • /var/log/auth.log

/tmp Temporary files

Cleared on reboot

World-writable (with restrictions)

/usr User applications and libraries

Not user-specific despite name

/usr/bin, /usr/lib

/dev Device files

Hardware represented as files

Example:

    • /dev/sda

    • /dev/null

/proc Kernel & process information

Virtual filesystem

Generated dynamically

Here are other essential directories:

Directory Purpose
/lib Shared libraries needed by /bin and /sbin
/opt Optional third-party software
/mnt & /media Mount points for external storage

Why it matters

Once you understand the hierarchy, you can:

  • Troubleshoot faster
  • Navigate confidently
  • Understand where applications live
  • Know where logs and configs are stored

This is foundational knowledge for any engineer.

Users, Groups, and Permissions – The Real Model

Linux is built on a simple but powerful security model.

Identities

Every process runs as a user with a UID (User ID). Users belong to groups with GIDs (Group IDs).

Ownership

Every file has:

  • An owner (user)
  • A group

Permission Bits

Each file has three sets of permissions:

  • User (owner)
  • Group
  • Others

Each set controls:

  • r → read
  • w → write
  • x → execute

Example:

-rwxr-x---

Which means:

  • Owner: read, write, execute
  • Group: read, execute
  • Others: no access

Why it matters

Understanding permissions makes commands like

  • chmod
  • chown
  • chgrp
  • umask

feel logical instead of mysterious.

Processes and the Kernel

A process is simply a running program. Linux manages processes using:

  • PIDs (process IDs)
  • Parent/child relationships
  • Signals (e.g., SIGTERM, SIGKILL)
  • Schedulers (decide which process gets CPU time)

Foreground vs Background

  • Foreground: runs in the terminal
  • Background: runs behind the scenes

Commands like ps, top, htop, kill, and jobs make sense once you understand this model.

How Everything Fits Together

Here’s the mental model:

+-----------------------------+
      | Applications |         
+-----------------------------+
         | Shell |             
+-----------------------------+
     | System Utilities |      
+-----------------------------+
        | User Space |         
+-----------------------------+
          | Kernel |           
+-----------------------------+
         | Hardware |          
+-----------------------------+
  • The shell is just a translator.
  • The kernel is the enforcer.
  • User space is where you live.
  • Hardware is what the kernel controls.

Once you see Linux as layers, everything becomes predictable.

Practical Mini‑Exercises (No Copy‑Paste Commands)

These exercises reinforce understanding:

1. Identify your shell

Explain what it is and why it matters.

2. Explore the filesystem

Navigate  /etc, /var/log, /usr/bin.

3. Inspect a running process

Find its parent and children.

4. Check file permissions

Explain what each bit means.

5. Trace what happens when you run a command

Use type, which, and strace (optional).

These build intuition – not memorization.

Why Understanding This Makes You a Better Engineer

This foundational knowledge improves:

  • Troubleshooting
  • Security
  • Automation
  • Scripting
  • Cloud engineering
  • Containerization
  • DevOps workflows

Linux is everywhere: servers, containers, IoT, cloud platforms, and understanding how it works gives you an edge.

Conclusion

Linux isn’t about commands. It’s about understanding the system.

Once you grasp the kernel, the shell, processes, permissions, the filesystem, and the execution lifecycle. Linux becomes predictable, elegant, and even enjoyable.

 

Ready to go deeper? Explore the Linux Beginner Labs: Foundations a hands-on way to truly understand Linux, not just memorize command

Leave a Comment

Your email address will not be published. Required fields are marked *

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Suggested text: Our website address is: https://humbletech.cloud.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymised string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service Privacy Policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognise and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.
Save settings
Scroll to Top