Skip to content
Go back

Linux-M1 - Introduction to Linux

Published:

Introduction to Linux and Unix


1. What is an Operating System (OS)?

An Operating System (OS) is a software that:


2. What is Unix?

Definition:

Unix is a family of multitasking, multiuser operating systems originally developed in the 1960s.

Key Characteristics:

Historical Development of Unix:


3. What is Linux?

Definition:

Linux is a family of Unix-like operating systems. When people mention Linux, they usually refer to a specific distribution or flavor of Linux.

Purpose of Linux:

Developed to provide a free, open-source alternative to Unix.

Key Features of Linux:


4. Historical Development of Linux

1980s: GNU Project

1991: Birth of the Linux Kernel

1992: Merging GNU and Linux

1996: Tux the Penguin


5. Current Use Cases of Unix and Linux

Unix (e.g., macOS):

Linux:

Common Use Cases for Linux Today:

  1. Mobile Devices:
    • Android uses a Linux-based kernel.
    • Billions of smartphones run on Linux-powered Android.
  2. Supercomputing:
    • Used in clusters of high-performance computing systems.
    • Dominates the field of scientific and engineering computation.
  3. Enterprise & Cloud Data Centers:
    • Millions of servers run Linux for hosting web services, databases, and cloud infrastructure.
  4. Personal Computers:
    • Many users install Linux for learning or daily use.
    • Popular distributions include Ubuntu, Fedora, Debian, Linux Mint, etc.

6. Summary

✅ Define what an Operating System (OS) is and its role.
✅ Understand the history and evolution of Unix.
✅ Explain the origins of Linux and how it relates to Unix.
✅ List the key features of Linux: free/open-source, secure, multi-user, multitasking, and portable.
✅ Recognize the modern-day usage of Linux in mobile devices, servers, supercomputers, and PCs.


Overview of Linux Architecture


1. Introduction to Linux System Layers

The Linux system is structured into five distinct layers, each with a specific role in ensuring the smooth operation of the system.

The Five Layers of Linux Architecture:

  1. User Interface (UI)
  2. Application Layer
  3. Operating System (OS) Layer
  4. Kernel Layer
  5. Hardware Layer

2. Layer-by-Layer Breakdown

1. User Interface (UI)

Example: You can use a web browser (application) through the GUI to send an email or a music player to listen to a song.


2. Application Layer

These applications communicate with the OS to execute commands and access resources.


3. Operating System (OS) Layer

This layer sits on top of the kernel and provides high-level management services.


4. Kernel Layer

The kernel is the lowest-level software in the system and has full control over it.


5. Hardware Layer

The kernel interacts directly with this layer to manage resources and run applications.


3. Linux Filesystem Structure

Overview

Key Directories in the Filesystem

DirectoryPurpose
/ (Root)Top-level directory containing all other directories.
/binEssential user binary files (commands like ls, cp).
/usrUser programs and utilities (e.g., applications).
/homePersonal working directories for users (e.g., /home/user).
/bootFiles needed to boot the system (kernel, bootloader config).
/mediaMount point for removable media (USB drives, CDs).
/etcConfiguration files for system and applications.
/varVariable data such as logs, caches, and spool files.
/tmpTemporary files used by applications and the OS.
/devDevice files representing hardware components.
/libShared libraries required by binaries in /bin and /sbin.

Each file and directory has access rights assigned for security and proper usage.


4. Summary

✅ The five layers of a Linux system: UI, Applications, OS, Kernel, and Hardware.
✅ The role of each layer in enabling user interaction, application execution, and hardware communication.
✅ The structure of the Linux filesystem, including key directories and their purposes.


Visual Representation (Simplified)

[User Interface]

[Applications]

[Operating System]

   [Kernel]

   [Hardware]

Quick Recap Table

LayerDescriptionExample
User InterfaceHow users interact with the systemGUI (desktop), CLI (terminal)
Application LayerTools and programs for tasksWeb browser, text editor
Operating SystemManages system health and jobsProcess scheduling, error detection
KernelCore of the OS; communicates with hardwareMemory & process management
HardwarePhysical componentsCPU, RAM, storage, input/output devices

1. Introduction to Text Editors in Linux

Text editors are essential tools for writing, modifying, and managing code or configuration files in a Linux environment.

Two Main Categories of Text Editors:

TypeDescription
Command-line text editorsOperate directly in the terminal. Useful for remote servers and scripting environments.
GUI-based text editorsOffer a graphical interface with menus and toolbars. Ideal for desktop users.

1. GNU nano

To open or create a file:

nano filename.txt

Basic nano Commands (Use Ctrl + [Key])

CommandFunction
Ctrl + GGet Help
Ctrl + WSearch for text (“Where Is”)
Ctrl + OWrite (Save) the file
Ctrl + XExit nano
Ctrl + KCut a line
Ctrl + UPaste a line

2. vi / vim

To start editing a file:

vim filename.txt

Basic vim Workflow

  1. Open file → starts in Command Mode
  2. Press i → switch to Insert Mode
  3. Edit text
  4. Press Esc → return to Command Mode
  5. Save and exit:
    • :w → write/save changes
    • :q → quit
    • :wq → save and quit
    • :q! → quit without saving

Tip: Vim has a steep learning curve but is extremely powerful once mastered.


gedit

Key Features of gedit:

Ideal for beginners or anyone who prefers a visual interface.


4. Other Notable Text Editors

emacs


5. Summary of Key Concepts

List popular Linux text editors, both command-line and GUI-based.
Describe features of gedit, the default GUI editor in GNOME.
Open and edit files using nano and vim from the command line.
Understand basic commands for navigating and saving files in nano and vim.


Quick Reference Table

EditorTypeStrengthsCommon Use Case
nanoCLISimple, easy to useQuick edits, beginner-friendly
vimCLIPowerful, fast, modalAdvanced editing, scripting
geditGUIUser-friendly, syntax highlightingDesktop development, casual editing
emacsCLI/GUIHighly extensible, customizableDevelopment, long-term projects

Linux Distributions


1. What is a Linux Distribution (Distro)?

A Linux distribution, or distro, is a specific version or “flavor” of the Linux operating system.

Key Components of a Linux Distro:

There are hundreds of Linux distros, each tailored for specific audiences or tasks like servers, desktops, embedded systems, or educational purposes.


2. What Differentiates Linux Distributions?

Linux distributions differ in several key ways:

FeatureDescription
Default Applications & UtilitiesEach distro comes with its own set of pre-installed software tools.
Graphical User Interface (GUI)Some use GNOME, KDE, XFCE, or other desktop environments.
Shell Commands & ToolsMay vary slightly depending on the distro’s configuration and package manager.
Support ModelCommunity-driven (e.g., Debian) or enterprise-backed (e.g., Red Hat).
Release Cycle
  • LTS (long-term support): stable updates over years.
  • Rolling release: continuous updates with latest software versions.

1. Debian


2. Ubuntu


3. Red Hat Enterprise Linux (RHEL)


4. Fedora


5. SUSE Linux Enterprise (SLE)


6. Arch Linux


4. Summary

What a Linux distribution is and what components it includes.
✅ The differences between Linux distros based on GUI, tools, support, and release cycles.
✅ The unique features and use cases of popular distros such as Debian, Ubuntu, Red Hat, Fedora, SUSE, and Arch Linux.


Quick Comparison Table

DistroTypeUse CaseSupportRelease Model
DebianCommunityServersFreeStable releases
UbuntuCommercialDesktop, CloudCanonicalLTS & Regular
RHELEnterpriseEnterprise ServersPaidStable releases
FedoraCommunityDevelopmentRed HatRolling updates
SUSEEnterpriseEnterprise SystemsSUSEStable releases
ArchCommunityCustomizationCommunityRolling release

Linux Terminal Overview


1. What is the Linux Shell?

Definition:

The Linux shell is an OS-level application that interprets and executes commands entered by a user.

Key Points:


2. What is the Linux Terminal?

Definition:

A terminal is an application or interface where you type commands and view their output.

How It Works:

Example:

python myprogram.py

This runs a Python script called myprogram.py and displays its output (e.g., “Hello, World!”).


3. How Terminal and Shell Work Together

Step-by-Step Execution Flow:

  1. User types a command in the terminal.
  2. Terminal sends the command to the shell.
  3. Shell interprets the command and communicates with the operating system and kernel.
  4. Kernel interacts with hardware to execute the task.
  5. Once completed, results are passed back through the chain to the terminal, where they are displayed to the user.

4. Understanding the Command Line Interface (CLI)

Command Prompt:

Current Working Directory:


5. Navigating the Filesystem Using the Terminal

Basic Commands for Navigation:

CommandDescription
cd /Move to the root directory (/)
cd binMove into the bin directory from current location
cd ~Go to the user’s home directory
cd ..Move up one level to the parent directory
cd ../..Move up two levels in the directory tree
cd /home/me/DocumentsNavigate directly to a specific path

6. Understanding Paths in Linux

Path:

A human-readable location of a file or directory in the filesystem.

Types of Path Notation:

SymbolMeaningExample
/Root directory/home/user/file.txt
~User’s home directory~/Documents
.Current directory./file.txt
..Parent directory../other_folder

Path structure uses forward slashes:
Example: a/b means “b” is inside “a”.


7. Listing Files and Running Programs

List Files in Current Directory:

ls

Run an Executable File:

./ls

Note: Many commands like ls are built into the shell and don’t require ./.


8. Practical Examples

Example 1: Navigating to the Home Directory

cd ~

Even if ls isn’t in the current directory, you can still use it because it’s part of the system PATH.

Example 2: Moving Up and Down the Filesystem

cd ../..

Moves up two levels in the directory hierarchy.

cd /home/me/Documents

Navigates directly to the Documents folder.

Example 3: Running a Python Script

cd /home/me
python myprogram.py

Runs a Python script named myprogram.py located in the current directory.


9. Summary

✅ What the Linux shell is and how it interprets commands.
✅ What a terminal is and how it serves as the interface for interacting with the shell.
✅ How the terminal and shell work together to execute commands via the kernel and hardware.
✅ How to navigate directories using the cd command and understand path structures in Linux.


Quick Reference Table

TaskCommand
Change to root directorycd /
Go to home directorycd ~
Move to parent directorycd ..
Move to specific pathcd /home/me/Documents
List contents of current directoryls
Run a Python scriptpython myprogram.py

Browsing Directories with the Linux Terminal


Learning Objectives

By the end of this guide, you will be able to:

✅ Understand what a Linux terminal is and how it works
✅ Use the pwd command to display your current working directory
✅ Use the ls command to list contents of a directory


1. What Is the Linux Terminal?

The Linux terminal, also known as:

It is a text-based interface used to interact with the operating system by typing commands.

Understanding the Prompt

You may see something like:

/home/project $

On some systems, you might see # instead of $. A # indicates you’re logged in as a superuser (root).


2. pwd – Print Working Directory

Purpose

Shows the full path of the directory you are currently in.

Usage

pwd

Example Output

/home/project

This means you are in the project subdirectory inside the home directory.


3. ls – List Directory Contents

Purpose

Displays files and directories in the current location or specified location.

Basic Usage

ls

If the current directory is empty, the command returns no output — not even a blank line.

List Contents of a Specific Directory

You can specify a directory path:

ls /home

Example Output

project  theia

This shows that the /home directory contains two subdirectories: project and theia.


4. Understanding Filesystem Paths

Linux uses a tree-like structure for organizing files and directories.

Root Directory

Subdirectories

Path Examples

PathDescription
/Root directory
/homeHome directory (contains user directories)
/home/projectUser-specific directory for projects

5. Summary of Commands

CommandDescriptionExample
pwdPrint Working Directory – show current locationpwd/home/project
lsList contents of current directoryls
ls <dir>List contents of a specific directoryls /home

6. Final Notes


Linux Terminal Tips: Tab Completion & Command History


Learning Objectives

By the end of this guide, you will be able to:

✅ Use Tab Completion to speed up command typing
✅ Use Command History to reuse or edit previous commands

These two features help make working in the Linux terminal faster, more efficient, and less error-prone.


1. Tab Completion – Speed Up Typing Commands

What is Tab Completion?

A time-saving feature that auto-fills partially typed commands, file names, or paths when you press the Tab key.

Works for:

How It Works

Examples

Example 1: Navigate to Pictures

cd P<TAB>

Becomes:

cd Pictures/

Because Pictures is the only directory starting with “P”.

Example 2: Ambiguous Match (Do → Documents vs Downloads)

cd Do<TAB>

No auto-complete because both Documents and Downloads start with “Do”.

Example 3: Specific Match (Doc → Documents)

cd Doc<TAB>

Becomes:

cd Documents/

Only one match found.

Example 4: Long Path Completion

Inside ~/Documents:

cd py<TAB>

If there’s only one folder named python-examples, it becomes:

cd python-examples/

You can keep pressing Tab to go deeper into nested directories if they’re unambiguous.


2. Command History – Reuse Previous Commands

What is Command History?

Linux keeps a record of all commands you’ve entered during your session.

You can navigate this list using:

This lets you reuse or modify previous commands without retyping them.

How to Use It

Scenario: You ran these commands

cd ~/Documents/python-examples
python3 myprogram.py
cd /

Now, at the prompt:

/ $

Step 1: Press ↑ once

Repeats the last command:

cd /

Step 2: Press ↑ again

Repeats:

python3 myprogram.py

Step 3: Press ↑ again

Repeats:

cd ~/Documents/python-examples

Tip: If you go too far back, use the ↓ arrow to move forward through history.


3. Summary Table

FeatureDescriptionExample
Tab CompletionAuto-completes commands, filenames, or pathsType cd Doc<TAB> → completes to cd Documents/
Command HistoryRecalls previously used commandsUse ↑ and ↓ arrows to scroll through commands

4. Final Tips


Exercise 1 - Browsing Directories with ls

In this exercise, you’re learning how to navigate and view the contents of directories using the ls command in a Linux shell environment.


📌 Summary of Key Concepts

🔹 What is ls?


1.1 Viewing Files in the Current Working Directory

Command:

ls

Explanation:


1.2 Viewing Files in Any Directory

You can list the contents of any directory by specifying its path:

Command:

ls [PATH TO DIRECTORY]

Example:

ls /

Common System Directories:

DirectoryContents
/binEssential user command binaries (like ls, cp, mv)
/sbinSystem administration binaries
/usrUser programs and data
/homeHome directories for users
/mediaMount points for removable media

🧪 Try These Commands

To explore the system, try these in your terminal:

ls /              # List root directory contents
ls /bin           # List commands available in /bin
ls /home          # See what users exist (you may see 'project')
ls /etc           # Configuration files
ls /usr/bin       # More user-level command binaries

💡 Tip


Exercise 2 - Navigating Directories with cd

In this exercise, you’re learning how to change directories using the cd (change directory) command in a Linux shell.


🧭 Key Navigation Symbols

SymbolMeaningExample
~Your home directorycd ~ goes to /home/theia
/The root directory of the systemcd /
.The current directorycd . stays where you are
..The parent directorycd .. moves up one level

2.1 Changing to Your Home Directory

cd ~

2.2 Going to the Parent Directory

cd ..

2.3 Changing to the Root Directory

cd /

2.4 Changing to a Child Directory

Method 1: Relative Path

cd bin

Method 2: Using . (Current Directory)

cd ./bin

⚠️ Tip: Make sure you’re in the correct parent directory before navigating into a child directory. If you’re already in /bin, typing cd ./bin would try to go to /bin/bin, which may not exist.


2.5 Returning to Your Home Directory

Option 1: Using ~ (Fastest Way)

cd ~

Option 2: Using Relative Path

cd ../home/theia

2.6 Navigating to the Project Directory

cd ../project

📌 Final Tips


Exercise 3 - Using Tab Completion and Command History

In this exercise, you learned two powerful tools to make working in the terminal faster, easier, and less error-prone:


🔄 3.1 Scrolling Through Command History

You can easily review and reuse previously entered commands using:

KeyAction
(Up Arrow)Go back one command
(Down Arrow)Go forward one command

Example:

If you previously typed:

cd /
cd bin
ls

Then pressing will bring back ls, then cd bin, then cd /, etc.

Use Case:

Let’s say you want to run cd bin again:

💡 If the command doesn’t work because your current directory changed, keep scrolling until you find cd /, run that first, then try cd bin.


🧠 3.2 Using Tab Completion

Tab completion helps you type faster by auto-filling file and directory names.

How It Works:

Step-by-step example:

  1. Type:
    cd /bi
  2. Press Tab
    • It autocompletes to:
      cd /bin

What if there are multiple matches?

Try typing:

cd /b

Then press Tab once → nothing happens
Press Tab twice → You’ll see options like:

bin/   boot/

Now add an i:

cd /bi

Press Tab again → completes to:

cd /bin

Tip:


🛠️ Practice: Digging Into a Path Using Tab Completion

Let’s build a longer command using tab completion:

Start typing:

ls /ho

Press Tab → becomes:

ls /home/

Now type:

ls /home/the

Press Tab → becomes:

ls /home/theia

Keep going:

ls /home/theia/dsdriver/bi

Press Tab → becomes:

ls /home/theia/dsdriver/bin

This way, you built:

ls /home/theia/dsdriver/bin

…without typing the whole thing!


✅ Summary of Tips

FeatureShortcutDescription
Command History / Scroll through previous commands
Tab CompletionTabAuto-complete file/directory names
Show OptionsTab + TabList possible completions
Speed & AccuracyMix of bothAvoid typos and save time

Linux Packages and Package Managers


1. What Are Packages in Linux?

A package is a file that contains:

Packages are used to install, update, or remove software on Linux systems.

Common package formats:


2. Understanding Package Managers

What Is a Package Manager?

A tool that automates the process of:

Types of Package Managers:

TypeDescriptionExamples
GUI-basedVisual interface for managing softwareUpdate Manager, PackageKit
CLI-basedTerminal-based toolsapt, yum, dnf

3. Differences Between .deb and .rpm Packages

Feature.deb.rpm
Used byDebian, Ubuntu, Linux MintCentOS, RHEL, Fedora, openSUSE
Package managerapt, dpkgyum, dnf, rpm
File extension.deb.rpm
Conversion possible?Yes, using the alien tool

Example: Convert an RPM to DEB format:

sudo alien package.rpm

Convert a DEB to RPM format:

sudo alien -r package.deb

4. GUI-Based Package Managers

Update Manager (Debian/Ubuntu)

PackageKit / Software Update (RPM-based Systems)


5. Command-Line Package Managers

For Debian/Ubuntu (.deb): apt

APT stands for Advanced Package Tool.

Common Commands:

TaskCommand
Update package listsudo apt update
Upgrade all packagessudo apt upgrade
Install a specific packagesudo apt install package_name
Remove a packagesudo apt remove package_name
Search for a packageapt search keyword

For Red Hat/CentOS/Fedora (.rpm): yum / dnf

Common Commands (yum/dnf):

TaskCommand
Update all packagessudo yum update or sudo dnf upgrade
Install a packagesudo yum install package_name or sudo dnf install package_name
Remove a packagesudo yum remove package_name or sudo dnf remove package_name
Search for a packageyum search keyword or dnf search keyword

6. Using Package Managers to Install Software

You can use package managers not only for system-level applications but also for programming languages and development tools.

Example: Installing Python Libraries via pip

pip install pandas

This command:

Similar tools exist:


7. Summary

Define what a Linux package is and how it’s used.
Differentiate between .deb and .rpm package formats and understand how they can be converted.
Use GUI-based package managers like Update Manager and PackageKit to check and install updates.
Use CLI tools like apt and yum to manage software on your system.
Install new software using package managers for both system and development purposes.


Quick Reference Table

TaskDebian/Ubuntu (.deb)Red Hat/CentOS/Fedora (.rpm)
GUI ToolUpdate ManagerPackageKit
CLI Toolaptyum / dnf
Update Systemsudo apt update && sudo apt upgradesudo yum update
Install Packagesudo apt install package_namesudo yum install package_name
Remove Packagesudo apt remove package_namesudo yum remove package_name
Search Packageapt search keywordyum search keyword

Exercise 1 - Upgrading and Installing Packages with apt

In this exercise, you learned how to use the sudo command along with apt, a powerful package management tool in Linux. You used it to:


🔐 1.1 Updating Your System’s Package List Index

Command:

sudo apt update

What It Does:

🕒 This command may take a few moments to complete.
💡 You can view the repository sources at /etc/apt/sources.list.


✏️ 1.2 Upgrading nano

Command:

sudo apt upgrade nano

What Happens:

⚠️ If you see a : prompt during the process (like in a pager), press q to quit and continue.


💾 1.3 Installing vim

Command:

sudo apt install vim

Why Vim?

Installation Steps:

  1. Run:
    sudo apt install vim
  2. Confirm with:
    Do you want to continue? [Y/n]
    Type Y and press Enter

🧠 Note: Always run sudo apt update before installing or upgrading packages to ensure you’re getting the latest software versions.


📌 Summary Table

TaskCommand
Update package listsudo apt update
Upgrade a package (e.g., nano)sudo apt upgrade nano
Install a new package (e.g., vim)sudo apt install vim

🧪 Quick Tips


Exercise 2 - Creating and Editing Files with nano

In this exercise, you learned how to create and edit files using the nano text editor from the command line.


🧭 2.1 Navigating to Your Project Directory

Command:

cd /home/project

Tip: Use Tab Completion

You can type:

cd /home/pr

Then press Tab, and it will auto-complete to:

cd /home/project

Once there, verify with:

ls

✏️ 2.2 Creating and Editing a File with nano

Create a new file:

nano hello_world.txt

This opens the nano editor and creates the file.

Inside Nano:

  1. Type:
    Hello world!
  2. Press Enter
  3. Type:
    This is the second line of my first-ever text file created with nano.

Save and Exit:

Nano saves the file and returns you to the terminal.


🔍 2.3 Verifying Your File Content

To view the contents of your file:

cat hello_world.txt

You should see:

Hello world!
This is the second line of my first-ever text file created with nano.

✅ Success! You’ve just created and edited your first file in Linux using nano.


📋 Summary of Commands

ActionCommand
Navigate to project directorycd /home/project
Create/edit a file with nanonano hello_world.txt
Save and exit in nanoCTRL + X, then Y, then Enter
View file contentscat hello_world.txt

🧠 Pro Tip:
If you ever get stuck inside nano, remember:


Exercise 3 - Creating and Editing Files with Vim

In this exercise, you learned how to use Vim, a powerful and highly configurable text editor that is widely used in Linux environments. Vim uses different modes for editing and executing commands.


🧭 3.1 Quick Intro to Vim

Launching Vim

To start Vim:

vim

You’ll see something like:

VIM - Vi IMproved
...
:type :q<Enter> to exit
:type :help<Enter> for on-line help

Basic Commands

ModeActionCommand
Normal (Command) ModeOpen help:help
Normal ModeQuit Vim:q
Any ModeForce quit without saving:q!
Normal ModeSave file:w
Normal ModeSave and quit:wq

Try It:

💡 Tip: If you ever get stuck in Vim, press Esc, then type :q! to safely exit without saving.


✏️ 32.2 Creating and Editing a Text File with Vim

Step-by-step Instructions:

1. Navigate to your project directory:

cd /home/project

Use tab completion if possible:

cd /home/pr<TAB>

2. Create and open a new file:

vim hello_world_2.txt

This opens a new blank file in Normal Mode.

3. Switch to Insert Mode:

Press:

i

Now you can type into the file.

4. Add content:

Type:

Hello World!

Press Enter to go to the next line, then type:

This is the second line.

5. Exit Insert Mode:

Press:

Esc

You’re now back in Normal Mode.

6. Save the file:

Type:

:w

This writes (saves) the contents of the buffer to the file.

7. Quit Vim:

Type:

:q

You’ll return to the command prompt.


🔍 Verify Your File Was Saved

Use the cat command to view the contents:

cat hello_world_2.txt

You should see:

Hello World!
This is the second line.

✅ Congratulations! You’ve created and edited a file using Vim.


📋 Summary of Key Commands in Vim

TaskCommand
Start Vimvim filename.txt
Enter Insert Modei
Exit Insert ModeEsc
Save file:w
Save and quit:wq
Quit without saving:q!
Get help:help
Quit help:q

🧠 Pro Tips:

🎉 Summary: Great Job Completing the Lab!

You’ve just taken a big step in mastering essential Linux skills. Here’s what you accomplished:


🔧 System Administration Skills

You learned how to manage software on your system using apt and sudo:

These are foundational skills for maintaining and customizing any Linux environment.


📝 Text Editing with Nano and Vim

You created and edited files using two powerful command-line editors:

This gives you flexibility depending on your use case or preference!


🖥️ Bash Shell Proficiency

Throughout this lab, you became more comfortable with:

These skills will help you become fluent in the terminal — the heart of Linux system administration and development.


🌱 What’s Next?

Here are some great next steps to continue building your Linux expertise:

🔍 File Management:

🛠️ Advanced Vim:

📊 File Comparison:

🧪 Scripting:


🙌 Final Words

You’re well on your way to becoming confident and proficient in Linux. The more you explore, experiment, and practice, the more natural these tools will feel.

Remember: The terminal is not scary — it’s powerful. And now, it’s yours to master.

📄 Module 1 Cheat Sheet – Introduction to Linux

This cheat sheet summarizes the essential commands and concepts covered in this module. Keep it handy for quick reference while working in the Linux terminal.


🔧 Linux Terminal Tips

TaskCommand
Autocomplete path or commandTab key
Scroll through command history / arrow keys

Getting Information

TaskCommand
View manual for a command (e.g., ls)man ls

🗂️ Browsing and Navigating Directories

🧭 Special Path Symbols

SymbolMeaning
~Your home directory
/Root directory
.Current directory
..Parent directory

📁 Directory Commands

TaskCommand
List contents of current directoryls
List contents of another directoryls path_to_directory
Show current working directorypwd
Change to a subdirectorycd child_directory_name
Move up one directory levelcd ../
Go to your home directorycd ~ or just cd
Go to root directorycd /
Switch to a sibling directorycd ../sibling_dir_name
Return to previous working directorycd -

📦 Upgrading and Installing Packages

Use sudo to run administrative commands.

TaskCommand
Update package listsudo apt update
Upgrade an existing package (e.g., nano)sudo apt upgrade nano
Install a new package (e.g., vim)sudo apt install vim

✏️ Creating and Editing Files

TaskCommand
Create or edit a file with nanonano file_name.txt
Create or edit a file with vimvim file_name.txt

💻 Vim Modes Reminder

Common Vim Commands (in Normal Mode):

ActionCommand
Save (write) file:w
Quit:q
Save and quit:wq
Quit without saving:q!
Get help:help

🎉 Summary & Highlights – Module Complete!

Great job completing this module! You’ve built a solid foundation in Linux fundamentals, from its history to core components and practical tools. Here’s a concise recap of what you’ve learned:


🕰️ A Brief History of Linux


💻 Where Is Linux Used Today?

Linux powers:

Its flexibility and stability make it ideal for both personal and enterprise environments.


🧩 Linux Distributions (Distros)

Different flavors of Linux tailored to specific needs:

DistributionUse Case
UbuntuBeginner-friendly, desktop and server
DebianStable, community-driven
FedoraCutting-edge features, developer-focused
Red Hat Enterprise Linux (RHEL)Enterprise use, commercial support
SUSE (SLES/SLED/OpenSUSE)Enterprise and development
Linux MintEasy for Windows users to switch
ArchDIY-oriented, rolling release model

Each distro varies in:


🏗️ The Five Layers of Linux Architecture

  1. User Interface (UI): Where users interact with applications.
  2. Applications: Programs used to perform tasks (e.g., browsers, editors).
  3. Operating System: Manages system resources and ensures smooth operation.
  4. Kernel: The core of Linux; handles communication between software and hardware.
  5. Hardware: Physical components like CPU, memory, disk drives.

Everything runs on top of the kernel, which is the bridge between your apps and your computer’s physical components.


📁 Filesystem Overview


🖥️ Shell and Terminal Basics


✍️ Text Editors in Linux

You can edit files using:


📦 Package Management

Two major package formats:

Common package managers:

Basic commands:

sudo apt update       # Update package list
sudo apt upgrade      # Upgrade packages
sudo apt install      # Install new packages

🧠 Final Thoughts

You now understand:

This sets the stage for deeper exploration into scripting, permissions, networking, containers, and more!


📘 Ready for the Next Module?
Let me know if you’d like to dive into:

Keep up the awesome work — Linux mastery is within your reach! 🐧🚀



Suggest Changes

Previous Post
Linux-M3 - Introduction to Shell Scripting
Next Post
Linux-M4 - Final Project