Linux Operating System

Linux is a powerful, open-source operating system family widely used in servers, cloud computing, cybersecurity, programming, networking, supercomputers, and many embedded devices.

Linux can look difficult to beginners because it contains many new terms such as:

  • Kernel
  • Distribution
  • Shell
  • Terminal
  • Root
  • sudo
  • Package Manager
  • File Permissions
  • Processes
  • Services

However, the basic idea of Linux is simple.

In simple words:

Linux manages computer hardware and provides an environment in which users and applications can work.

Just like Windows and macOS, Linux manages:

  • CPU
  • RAM
  • Storage
  • Files
  • Applications
  • Users
  • Hardware devices
  • Networks
  • Security

A simplified relationship is:

User → Application → Linux → Hardware

What is Linux?

Linux commonly refers to a family of operating systems built around the Linux kernel.

The Linux kernel was originally created by Linus Torvalds in 1991.

The kernel itself is only the core part of the operating system.

A complete Linux operating system normally includes:

  • Linux kernel
  • System utilities
  • Command-line tools
  • Libraries
  • Package management tools
  • Desktop environment, if required
  • Applications

This complete collection is usually distributed as a Linux distribution, also called a Linux distro.

Examples include:

  • Ubuntu
  • Debian
  • Fedora
  • Linux Mint
  • Arch Linux
  • Kali Linux
  • Red Hat Enterprise Linux

Is Linux an Operating System or a Kernel?

This is an important point.

Technically:

Linux = Kernel

However, in normal conversation, people often use the word Linux to describe complete operating systems built around the Linux kernel.

For example:

Ubuntu Linux

contains the Linux kernel plus many additional programs and tools.

So beginners can remember:

Linux Kernel = Core of the system

Linux Distribution = Complete operating system built around Linux

Linux Kernel vs Linux Distribution

Linux KernelLinux Distribution
Core componentComplete operating system
Manages CPU, memory and hardwareIncludes kernel plus applications and utilities
Created and maintained by kernel developersMaintained by distribution communities or companies
Does not provide a complete normal desktop by itselfCan provide full desktop or server environment
Example: Linux kernelExample: Ubuntu

Simple Example of Linux

Suppose you use Ubuntu on a laptop.

When you open Firefox:

  1. You click the Firefox icon.
  2. Ubuntu receives your request.
  3. Firefox files are loaded from storage.
  4. Required data is placed in RAM.
  5. The CPU executes the program.
  6. Linux manages hardware access.
  7. Firefox appears on your screen.

The process is similar to Windows or macOS.

The major difference is how Linux is designed, managed, configured, and distributed.

Why is Linux Important?

Linux is extremely important in modern computing.

It is widely used in:

  • Web servers
  • Cloud platforms
  • Data centres
  • Cybersecurity
  • Networking
  • Software development
  • Supercomputers
  • Embedded devices
  • Internet infrastructure
  • Containers

Many websites and online services run on Linux servers.

Cybersecurity professionals also use Linux heavily because it provides powerful networking, scripting, automation, and security tools.

Linux is Open Source

One major feature of Linux is that it is open source.

This means the source code is available under open-source licences that allow people to inspect, modify, and distribute it according to the licence terms.

This is different from proprietary systems where the complete source code is normally controlled by a company.

Open Source vs Proprietary Software

Open SourceProprietary
Source code is available under an open-source licenceSource code is usually closed
Can often be inspected and modifiedModification is restricted
Community participation is commonControlled primarily by the owner
Many Linux components are open sourceWindows and macOS contain proprietary components
Distribution terms depend on licenceUsage depends on vendor licence

What is a Linux Distribution?

A Linux distribution is a complete operating system built around the Linux kernel.

A distribution normally includes:

  • Linux kernel
  • Package manager
  • System utilities
  • Libraries
  • Shell
  • Applications
  • Configuration tools

Different distributions are designed for different purposes.

Popular Linux Distributions

Ubuntu

Ubuntu is one of the most beginner-friendly Linux distributions.

It is commonly used for:

  • Desktop computers
  • Servers
  • Cloud systems
  • Development

Debian

Debian is known for:

  • Stability
  • Large software repositories
  • Strong community support

Many other Linux distributions are based on Debian.

Linux Mint

Linux Mint is designed to provide an easy desktop experience.

It is popular among users switching from Windows.

Fedora

Fedora is a modern Linux distribution associated with the Red Hat ecosystem.

It often includes newer technologies.

Red Hat Enterprise Linux

Red Hat Enterprise Linux, or RHEL, is designed mainly for enterprise environments.

It is commonly used in:

  • Businesses
  • Servers
  • Data centres

Kali Linux

Kali Linux is designed mainly for:

  • Penetration testing
  • Digital forensics
  • Security research
  • Cybersecurity training

Kali is not normally recommended as a first general-purpose Linux desktop for beginners.

Arch Linux

Arch Linux provides a highly customisable environment.

It is popular among advanced Linux users who want more control.

Linux Distributions Comparison

DistributionBest Known ForBeginner Friendly
UbuntuDesktop, server, cloudYes
Linux MintEasy desktop useYes
DebianStabilityModerate
FedoraModern Linux technologiesModerate
RHELEnterprise serversModerate
Kali LinuxCybersecurityNot ideal as first distro
Arch LinuxCustomisation and learningAdvanced

What is the Linux Kernel?

The kernel is the core of the Linux operating system.

It manages communication between software and hardware.

The kernel controls important resources such as:

  • CPU
  • RAM
  • Storage devices
  • Network interfaces
  • Processes
  • Hardware devices

A simplified model is:

Applications

↓

System Libraries

↓

Linux Kernel

↓

Hardware

Simple Kernel Example

Suppose an application needs to save a file.

The application does not directly control the SSD.

Instead:

Application → Linux System Call → Kernel → File System → Storage

The kernel manages the low-level operation.

What is a Shell?

A shell is a program that allows users to interact with the operating system by entering commands.

Common Linux shells include:

  • Bash
  • Zsh
  • Fish

Bash stands for:

Bourne Again Shell

It is one of the most commonly used Linux shells.

What is a Terminal?

A terminal is an application that provides access to a command-line shell.

This distinction is important.

TerminalShell
Application or interfaceCommand interpreter
Displays command-line environmentProcesses commands
Opens a shellRuns inside the terminal
Example: Terminal applicationExample: Bash

A beginner may simply think:

Terminal = Window where commands are typed

Shell = Program that understands the commands

Linux GUI vs CLI

Linux can be used through:

  • Graphical User Interface
  • Command-Line Interface

Graphical User Interface

A GUI allows users to interact using:

  • Icons
  • Windows
  • Menus
  • Mouse
  • Buttons

Popular Linux desktop environments include:

  • GNOME
  • KDE Plasma
  • Cinnamon
  • XFCE

Command-Line Interface

The command line allows users to control Linux by typing commands.

For example:

ls

shows files and directories.

The command line is extremely important in:

  • Server administration
  • Networking
  • Cybersecurity
  • Automation
  • Cloud computing

GUI vs CLI

GUICLI
Uses icons and menusUses typed commands
Easier for beginnersRequires learning commands
Good for normal desktop usePowerful for administration
Slower for repetitive tasksExcellent for automation
Uses more system resourcesCan work with very few resources

Linux File System Structure

Linux uses a hierarchical file system.

Everything starts from:

/

This is called the root directory.

It is not the same thing as the root user.

The basic structure looks like:

/

├── home

├── etc

├── var

├── usr

├── bin

├── dev

├── tmp

├── root

└── boot

What is the Root Directory?

The root directory is represented by:

/

It is the top-level directory in Linux.

All files and folders are located underneath it.

For example:

/home/student/Documents

starts from the root directory.

Important Linux Directories

DirectoryPurpose
/Root of entire file system
/homeNormal users’ home directories
/rootHome directory of root user
/etcSystem configuration files
/varVariable data such as logs
/usrApplications, libraries and shared resources
/binEssential commands
/devDevice files
/tmpTemporary files
/bootBoot-related files

The /home Directory

Normal users usually have personal folders inside /home.

For example, if the username is:

alex

the home directory may be:

/home/alex

Inside it, the user may have:

  • Documents
  • Downloads
  • Pictures
  • Videos

This is similar to a user profile folder in Windows.

Windows Path vs Linux Path

WindowsLinux
C:\Users\Alex\Documents/home/alex/Documents
Uses drive lettersUses one unified directory tree
Backslash commonly usedForward slash used
Drive C:, D:, etc.Devices are mounted into directories

Linux is Case-Sensitive

Linux file names are generally case-sensitive.

For example:

file.txt

and

File.txt

can be two different files.

This is important.

On Linux:

Documents

and

documents

may be different directories.

Basic Linux Commands

The following commands are important for beginners.

pwd Command

pwd means:

Print Working Directory

It shows your current directory.

Example:

pwd

Output might be:

/home/student

This means you are currently inside /home/student.

ls Command

ls lists files and directories.

Example:

ls

Possible output:

Documents Downloads Pictures Videos

cd Command

cd means:

Change Directory

Example:

cd Documents

You move into the Documents directory.

To go back one level:

cd ..

mkdir Command

mkdir creates a new directory.

Example:

mkdir Study

This creates a folder called:

Study

touch Command

touch can create an empty file.

Example:

touch notes.txt

This creates:

notes.txt

cp Command

cp copies files.

Example:

cp notes.txt backup.txt

This creates a copy.

mv Command

mv moves or renames files.

Rename example:

mv notes.txt linux-notes.txt

Move example:

mv linux-notes.txt Documents/

rm Command

rm removes files.

Example:

rm notes.txt

Be careful.

Linux does not always move command-line deleted files into a graphical Trash folder.

The file may be removed immediately.

rmdir Command

rmdir removes an empty directory.

Example:

rmdir Test

It only works if the directory is empty.

cat Command

cat can display the contents of a text file.

Example:

cat notes.txt

The text inside the file appears in the terminal.

clear Command

clear clears the terminal screen.

Example:

clear

man Command

man displays the manual page for a command.

Example:

man ls

This shows documentation for ls.

This is extremely useful for learning Linux.

Important Beginner Commands

CommandPurpose
pwdShow current directory
lsList files
cdChange directory
mkdirCreate directory
touchCreate empty file
cpCopy files
mvMove or rename
rmRemove file
catDisplay file contents
clearClear terminal
manRead command manual

Absolute Path vs Relative Path

Linux supports two main path types.

Absolute Path

An absolute path starts from /.

Example:

/home/student/Documents/file.txt

It gives the complete location.

Relative Path

A relative path starts from your current directory.

Example:

Documents/file.txt

Absolute vs Relative Path

Absolute PathRelative Path
Starts from root /Starts from current location
Full locationShorter location
Works regardless of current directoryDepends on current directory
/home/alex/file.txtfile.txt

What Does . Mean in Linux?

A single dot:

.

means:

Current directory

For example:

./script.sh

means run script.sh from the current directory.

What Does .. Mean?

Two dots:

..

mean:

Parent directory

For example:

cd ..

moves one directory upward.

Hidden Files in Linux

Files beginning with a dot are usually hidden.

Example:

.bashrc

To see hidden files:

ls -a

Common hidden files store:

  • User preferences
  • Application settings
  • Shell configuration

Linux Users

Linux is a multi-user operating system.

Different users can have:

  • Separate files
  • Separate home directories
  • Different permissions
  • Different privileges

For example:

User A → /home/usera

User B → /home/userb

What is the Root User?

The root user is the most powerful administrative account in Linux.

Root can perform almost any system-level operation.

Root can:

  • Modify system files
  • Install software
  • Create users
  • Delete important files
  • Change permissions
  • Control services

Because root has so much power, it must be used carefully.

Root Directory vs Root User

These are completely different concepts.

Root DirectoryRoot User
Represented by /Administrative user
Top of file systemMost privileged account
Contains system directoriesCan modify critical system resources
Directory conceptUser account concept

What is sudo?

sudo allows an authorised user to run a command with elevated privileges.

sudo commonly means:

Superuser Do

Example:

sudo apt update

This runs the package update command with elevated privileges.

The system may ask for your password.

Why Not Use Root All the Time?

Using root constantly is dangerous.

For example:

A normal user may not have permission to delete an important system file.

Root can.

If a wrong command is executed as root, it can damage the system.

The safer approach is:

Normal user for everyday work

sudo only when administrative privileges are required

Linux Permissions

Linux has a powerful permissions system.

Every file and directory can have permissions for:

  • User
  • Group
  • Others

The main permissions are:

  • Read
  • Write
  • Execute

They are represented as:

r = Read

w = Write

x = Execute

Simple Permission Example

Suppose a file has:

-rwxr-xr--

At first this looks confusing.

Break it into groups:

- | rwx | r-x | r--

The groups represent:

Owner | Group | Others

So:

Owner:

rwx = Read + Write + Execute

Group:

r-x = Read + Execute

Others:

r– = Read only

Read, Write and Execute Permissions

PermissionFile MeaningDirectory Meaning
ReadView file contentsList directory contents
WriteModify fileCreate/delete entries
ExecuteRun file as programEnter/access directory

chmod Command

chmod changes permissions.

Example:

chmod +x script.sh

This adds execute permission to the script.

Then:

./script.sh

can run the script if other requirements are satisfied.

Numeric Linux Permissions

Linux permissions can also be represented using numbers.

The values are:

Read = 4

Write = 2

Execute = 1

For example:

7 = 4 + 2 + 1 = rwx

6 = 4 + 2 = rw-

5 = 4 + 1 = r-x

Example: chmod 755

chmod 755 script.sh

means:

Owner:

7 = rwx

Group:

5 = r-x

Others:

5 = r-x

So:

rwxr-xr-x

Common Permission Numbers

NumberPermission
7rwx
6rw-
5r-x
4r–
0—

File Ownership

Linux files have an owner and group.

You can inspect ownership using:

ls -l

Example:

-rw-r--r-- 1 alex students 1200 notes.txt

Here:

alex = Owner

students = Group

chown Command

chown changes file ownership.

Example:

sudo chown alex notes.txt

This changes the owner of the file.

Linux Package Management

Linux software is commonly installed using a package manager.

A package manager can:

  • Install software
  • Remove software
  • Update software
  • Manage dependencies

Different Linux distributions use different package management systems.

Common Package Managers

DistributionPackage Tool
Ubuntu/Debianapt
Fedora/RHEL familydnf
Arch Linuxpacman

Installing Software with apt

On Ubuntu or Debian-based systems:

sudo apt update

updates available package information.

Then:

sudo apt install curl

installs the curl package.

Removing Software

Example:

sudo apt remove curl

This removes the package.

Why Run apt update First?

apt update downloads the latest information about available packages from configured software repositories.

It does not normally upgrade all installed programs by itself.

Then:

sudo apt upgrade

can upgrade installed packages where appropriate.

Repository

A repository is a server or source containing software packages.

Instead of searching random websites for installers, Linux users often install software from trusted repositories.

A simplified process is:

User → Package Manager → Repository → Package Download → Installation

Linux Processes

A process is a program that is currently running.

Examples include:

  • Browser
  • Web server
  • SSH service
  • Background system task

Every process normally has a unique identifier called:

PID – Process ID

ps Command

ps displays process information.

Example:

ps

For a broader view:

ps aux

This can show many running processes.

top Command

top displays running processes and system usage.

Example:

top

It can show:

  • CPU usage
  • Memory usage
  • Process IDs
  • Running processes

It is similar in purpose to Task Manager on Windows.

htop

htop is a more interactive process monitoring tool available on many Linux systems.

It may need to be installed first.

It provides a more user-friendly view than traditional top.

kill Command

The kill command sends a signal to a process.

Example:

kill 1234

where 1234 is a process ID.

This normally asks the process to terminate.

Stronger signals can also be used, but they should only be used when necessary.

Linux Services

A service is a program that runs in the background and provides a function.

Examples include:

  • Web server
  • SSH server
  • Database server

Many modern Linux systems use:

systemd

for managing services and system startup.

systemctl Command

systemctl can manage systemd services.

Example:

systemctl status ssh

checks SSH service status.

Start service:

sudo systemctl start ssh

Stop service:

sudo systemctl stop ssh

Enable service at boot:

sudo systemctl enable ssh

Process vs Service

ProcessService
Any running programBackground program providing a function
Can be interactiveUsually runs in background
May end when user closes programOften runs continuously
Example: Text editorExample: SSH server

Linux Boot Process

A simplified Linux boot process is:

Power On

↓

Firmware

↓

Bootloader

↓

Linux Kernel

↓

init/systemd

↓

System Services

↓

Login Screen or Terminal

What is GRUB?

GRUB is a common Linux bootloader.

GRUB stands for:

GRand Unified Bootloader

It can:

  • Load Linux
  • Allow selection between operating systems
  • Pass boot options to the kernel

For example, on a dual-boot system:

Windows

or

Ubuntu

may appear in a GRUB menu.

What is systemd?

systemd is a system and service manager used by many modern Linux distributions.

It helps:

  • Start services
  • Stop services
  • Manage system startup
  • Manage system states
  • Record logs through related components

Linux Logs

Linux records many system events in log files.

Logs are important for:

  • Troubleshooting
  • Security investigations
  • System administration

Many traditional logs are stored under:

/var/log

Examples can include authentication logs, system logs, and application logs.

Exact log names vary by distribution.

journalctl

On systems using systemd, journalctl can view system logs.

Example:

journalctl

View recent errors:

journalctl -p err

Logs are extremely important in Linux administration and cybersecurity.

Linux Networking

Linux contains powerful networking tools.

Important concepts include:

  • IP address
  • Network interface
  • DNS
  • Routing
  • Ports
  • TCP
  • UDP

ip Command

The ip command can display network configuration.

Example:

ip addr

This shows network interfaces and IP addresses.

ping Command

ping tests basic connectivity to another host.

Example:

ping google.com

A successful response indicates that packets are reaching the destination and returning, although firewalls can block ping.

ss Command

ss can show network sockets and connections.

Example:

ss -tuln

This can display listening TCP and UDP ports.

Linux Networking Commands

CommandPurpose
ip addrShow IP addresses
pingTest connectivity
ssShow sockets and ports
tracerouteShow network route
nslookup/digQuery DNS
curlTransfer or request network data

Linux Environment Variables

An environment variable stores information used by programs and the shell.

A common example is:

PATH

PATH tells the shell where to search for executable programs.

Display PATH:

echo $PATH

What is PATH?

Suppose you type:

ls

Linux needs to know where the ls program is located.

It searches directories listed in the PATH environment variable.

This is why you can type ls instead of its complete location.

Linux Shell Redirection

Linux allows command output to be redirected.

Example:

ls > files.txt

Instead of displaying output on screen, it saves the output into:

files.txt

> vs >>

SymbolMeaning
>Overwrite file with output
>>Append output to file

Example:

echo Hello > test.txt

creates or overwrites the file.

echo World >> test.txt

adds another line.

Linux Pipes

A pipe is represented by:

|

It sends the output of one command into another command.

Example:

ps aux | grep firefox

This means:

Get process list → Send it to grep → Search for Firefox

Pipes are one of the most powerful Linux command-line concepts.

grep Command

grep searches text.

Example:

grep "error" logfile.txt

This searches for lines containing:

error

Simple Pipe Example

Suppose:

ls

returns 100 files.

You only want files containing log.

You can use:

ls | grep log

The output from ls goes into grep.

Linux Wildcards

Wildcards help match file names.

The most common is:

*

Example:

ls *.txt

This shows all files ending in .txt.

Another wildcard is:

?

which represents a single character.

Linux File Editing

Linux has many text editors.

Popular examples include:

  • nano
  • vim
  • vi
  • graphical editors

nano

Nano is beginner-friendly.

Example:

nano notes.txt

This opens the file in the nano editor.

Vim

Vim is powerful but more difficult for beginners.

Example:

vim notes.txt

Vim has different modes and is commonly used by experienced Linux users and administrators.

nano vs Vim

nanoVim
Easier for beginnersSteeper learning curve
Simple controlsVery powerful
Good for quick editsExcellent for advanced text editing
Short learning timeRequires practice

Linux Software Installation vs Windows Installation

LinuxWindows
Often uses package managerOften uses EXE/MSI installers
Software commonly comes from repositoriesSoftware commonly downloaded from websites or Store
Dependencies often managed automaticallyInstaller usually manages dependencies
Example: apt installExample: setup.exe

Linux File Permissions vs Windows Permissions

LinuxWindows
Uses user, group and others modelCommonly uses NTFS ACLs
rwx permissions are fundamentalDetailed access control lists
chmod changes permissionsSecurity properties/commands manage permissions
sudo commonly used for elevationUAC commonly handles elevation

Linux vs Windows

LinuxWindows
Mostly open-source ecosystemPrimarily proprietary Microsoft OS
Many distributionsMain Windows product family
Very common on serversVery common on desktops
Strong command-line cultureGUI-focused for most users
Highly customisableMore standardised user experience
Package managers widely usedStore and installer files commonly used
Strong server/cloud presenceStrong desktop and gaming presence

Linux vs macOS

LinuxmacOS
Open-source kernel and ecosystemApple-controlled operating system
Runs on many hardware platformsDesigned mainly for Mac hardware
Many distributionsOne Apple desktop OS family
Highly customisableMore controlled environment
Common on serversCommon on Apple desktops/laptops
Unix-likeUnix-based

Linux Security

Linux includes strong security features, but Linux is not automatically secure.

Security depends on:

  • Correct configuration
  • Updates
  • User permissions
  • Strong passwords
  • Network security
  • Application security

Linux uses several security concepts such as:

  • User separation
  • File permissions
  • sudo
  • Process isolation
  • Firewalls
  • Security modules

Linux and Malware

Linux can be affected by malware.

It is incorrect to say:

Linux cannot get viruses.

Linux malware exists.

However, Linux security architecture, permissions, software distribution practices, and typical usage patterns can reduce certain risks.

Security still depends on proper administration.

Linux Firewall

Linux systems can use firewall technologies such as:

  • nftables
  • iptables
  • firewalld
  • ufw

For beginners, Ubuntu users often work with:

ufw

which stands for:

Uncomplicated Firewall

Example:

sudo ufw status

shows firewall status.

Linux Updates and Security

Keeping Linux updated is important.

On Ubuntu:

sudo apt update
sudo apt upgrade

This updates package information and upgrades available packages.

Security updates often fix known vulnerabilities.

SSH

SSH stands for Secure Shell.

SSH allows secure remote access to another computer over a network.

Example:

ssh user@192.168.1.10

This connects to a remote machine if an SSH server is available and access is authorised.

SSH is extremely common in:

  • Linux servers
  • Cloud systems
  • Network administration
  • Cybersecurity

Why Linux is Popular on Servers

Linux is widely used on servers because it can provide:

  • Stability
  • Security
  • Remote administration
  • Automation
  • Strong networking
  • Low resource usage
  • Flexible configuration

Many Linux servers do not even use a graphical interface.

Administrators manage them through:

  • SSH
  • Terminal
  • Automation tools

Linux in Cloud Computing

Linux is heavily used in cloud environments.

Cloud servers often run Linux because it works well with:

  • Virtual machines
  • Containers
  • Automation
  • Web servers
  • Databases

Cloud engineers often need strong Linux command-line knowledge.

Linux in Cybersecurity

Linux is extremely important in cybersecurity.

Security professionals use Linux for:

  • Network analysis
  • Penetration testing
  • Malware analysis
  • Log analysis
  • Digital forensics
  • Security monitoring
  • Server security

Kali Linux is a well-known security distribution.

However, knowing Linux itself is more important than simply knowing Kali tools.

Linux in Programming

Developers use Linux because it provides:

  • Powerful command-line tools
  • Compilers
  • Interpreters
  • Git
  • Scripting
  • Package managers
  • Development libraries

Programming languages commonly used on Linux include:

  • Python
  • C
  • C++
  • Java
  • JavaScript
  • Go
  • Rust

Bash Scripting

Linux commands can be placed into files called shell scripts.

Example:

#!/bin/bash
echo "Hello"

This simple Bash script prints:

Hello

Scripts can automate repetitive tasks.

Why Automation is Powerful

Suppose you need to create 100 folders.

Doing it manually is slow.

Linux commands or scripts can create them automatically.

This is why command-line skills are valuable in system administration.

Linux Mounting

Linux normally does not use drive letters such as:

C:

or

D:

Instead, storage devices are mounted into directories.

For example:

/mnt/usb

or

/media/user/USB

may represent a USB drive.

Mounting vs Windows Drive Letters

LinuxWindows
Storage mounted into directoriesUses drive letters
/mnt/dataD:\
One unified file system treeMultiple drive letters
Mount points decide locationDrive letters identify volumes

Linux Device Files

Linux represents many hardware devices as special files under:

/dev

Examples may include:

/dev/sda
/dev/nvme0n1

These names can represent storage devices.

This reflects the Linux philosophy that many system resources can be accessed through file-like interfaces.

Linux Disk Commands

Common commands include:

lsblk

which lists block storage devices.

df -h

shows file-system disk usage.

du -sh folder

shows approximate storage used by a directory.

df vs du

dfdu
Shows file-system spaceShows file/directory usage
Useful for drive capacityUseful for finding large folders
Example: df -hExample: du -sh Downloads

Linux Hostname

A hostname identifies a computer on a network.

Display hostname:

hostname

The hostname might be:

ubuntu-server

Linux User Information Commands

Current user:

whoami

Logged-in users:

who

User information:

id

Linux System Information Commands

Kernel information:

uname -a

Operating system information may be found using:

cat /etc/os-release

Memory:

free -h

Disk usage:

df -h

Important Linux Commands to Remember

CommandFunction
pwdShow current directory
lsList files
cdChange directory
mkdirCreate folder
touchCreate file
cpCopy
mvMove or rename
rmDelete
catView file
grepSearch text
chmodChange permissions
chownChange ownership
psShow processes
topMonitor processes
killSend signal to process
ipNetwork configuration
pingTest connectivity
sudoRun elevated command
aptPackage management
systemctlManage services
journalctlView system logs

Advantages of Linux

Linux provides many advantages.

Open Source

Much of the Linux ecosystem is open source.

Highly Customisable

Users can change:

  • Desktop environment
  • Shell
  • Services
  • System configuration

Strong Server Platform

Linux is widely used on servers and cloud platforms.

Powerful Command Line

The command line provides excellent control and automation.

Security

Linux includes strong user, permission, and process security models.

Development Environment

Linux provides strong programming and development tools.

Low Resource Options

Some Linux distributions can run on relatively low-powered hardware.

Limitations of Linux

Linux also has limitations.

Learning Curve

Beginners may find commands and permissions difficult initially.

Software Compatibility

Some commercial Windows or macOS programs do not have native Linux versions.

Gaming Compatibility

Linux gaming has improved greatly, but some games and anti-cheat technologies may still have compatibility issues.

Hardware Drivers

Most common hardware works well, but some specialised devices may have limited Linux driver support.

Multiple Distributions

The large number of distributions can confuse beginners.

Common Beginner Linux Mistakes

Running Commands Without Understanding Them

Do not copy random commands from the internet, especially commands using:

sudo

Always understand what a command does.

Using Root for Everything

Root access should only be used when necessary.

Ignoring Permissions

Many Linux errors happen because users do not understand file permissions.

Wrong Capitalisation

Remember:

File.txt

and

file.txt

may be different files.

Deleting Files with rm Carelessly

Commands such as rm can permanently delete data.

Always check the path carefully.

Linux Learning Example

Suppose you want to create a folder named:

linux-course

Then create a text file inside it.

Step 1:

mkdir linux-course

Step 2:

cd linux-course

Step 3:

touch notes.txt

Step 4:

ls

You should see:

notes.txt

You have now:

  • Created a directory
  • Entered the directory
  • Created a file
  • Listed the contents

These four commands teach the foundation of Linux navigation.

Linux Practical Example with Permissions

Create a script:

touch hello.sh

Add content using a text editor:

nano hello.sh

Enter:

#!/bin/bash
echo "Hello Linux"

Save the file.

Then make it executable:

chmod +x hello.sh

Run it:

./hello.sh

Output:

Hello Linux

This example teaches:

  • Files
  • Text editing
  • Permissions
  • Execution
  • Bash scripting

Linux Practical Example with Processes

Open a terminal and run:

sleep 500

In another terminal, find the process:

ps aux | grep sleep

You may see its PID.

Then stop it:

kill PID

Replace PID with the actual process number.

This demonstrates basic process management.

Linux Practical Example with Networking

Check your IP addresses:

ip addr

Test connectivity:

ping 8.8.8.8

Test DNS name resolution:

ping example.com

These commands can help determine whether a networking issue relates to basic connectivity or name resolution.

Linux Practical Example with Packages

On Ubuntu:

sudo apt update

Then install a package:

sudo apt install curl

Check that it works:

curl --version

This teaches Linux package management.

Linux Practical Example with Logs

Suppose a system service has a problem.

Check service status:

systemctl status ssh

Then inspect logs:

journalctl -u ssh

This demonstrates how Linux administrators troubleshoot services.

Linux in a Real Server Example

Imagine a website running on a Linux server.

The server might contain:

Linux Operating System

↓

Web Server

↓

Website Files

↓

Database

↓

Network Connection

A user visits the website:

Browser → Internet → Linux Server → Web Server → Website Response

Linux manages the hardware and software resources required to provide the website.

Linux in Cybersecurity Example

Suppose a security analyst investigates suspicious login attempts.

The analyst may:

  1. Check authentication logs.
  2. Identify source IP addresses.
  3. Review running processes.
  4. Check open ports.
  5. Inspect user accounts.

Commands might include:

ss -tuln
ps aux
who
journalctl

This is why Linux knowledge is extremely valuable in cybersecurity.

Important Linux Terms to Remember

Linux: Operating system family built around the Linux kernel.

Kernel: Core part of the operating system.

Distribution: Complete Linux operating system package.

Shell: Program that interprets commands.

Terminal: Interface used to access a shell.

Bash: Popular Linux shell.

Root Directory: Top directory represented by /.

Root User: Most privileged administrative user.

sudo: Runs authorised commands with elevated privileges.

Permission: Controls read, write, and execute access.

Package Manager: Installs and manages software.

Repository: Source containing software packages.

Process: Running program.

PID: Process Identifier.

Service: Background program providing a system function.

systemd: Common Linux service and system manager.

SSH: Secure Shell for remote access.

GRUB: Common Linux bootloader.

Mount Point: Directory where a file system becomes accessible.

Frequently Asked Questions About Linux

What is Linux?

Linux commonly refers to operating systems built around the Linux kernel.

Who created Linux?

The Linux kernel was originally created by Linus Torvalds in 1991.

Is Linux free?

Many Linux distributions can be downloaded and used without a purchase fee.

Licensing and commercial support vary between distributions.

Is Linux an operating system?

Linux itself technically refers to the kernel, but complete Linux distributions function as operating systems.

What is a Linux distribution?

A Linux distribution combines the Linux kernel with system utilities, package management, applications, and other software.

Which Linux is best for beginners?

Ubuntu and Linux Mint are commonly considered beginner-friendly choices.

What is Kali Linux?

Kali Linux is a Linux distribution designed mainly for penetration testing, security research, and digital forensics.

Is Linux difficult?

Linux can initially feel difficult because of unfamiliar commands and concepts.

However, once users understand:

  • Files
  • Commands
  • Permissions
  • Users
  • Packages
  • Processes

the system becomes much easier to understand.

Does Linux have a GUI?

Yes.

Linux can use desktop environments such as:

  • GNOME
  • KDE Plasma
  • Cinnamon
  • XFCE

Does Linux need antivirus?

Linux can be affected by malware.

Security requirements depend on the environment and use case.

Good security still requires updates, safe configuration, appropriate permissions, and monitoring.

What is sudo?

sudo allows authorised users to execute commands with elevated privileges.

What is root in Linux?

Root is the most privileged administrative account.

What does / mean in Linux?

/ represents the root directory, which is the top of the Linux file system.

What is Bash?

Bash is a command-line shell commonly used on Linux.

What is a Linux package manager?

A package manager installs, removes, updates, and manages software packages.

What is apt?

apt is a package management tool commonly used on Debian-based distributions such as Ubuntu.

Why is Linux used on servers?

Linux is popular on servers because of its stability, networking capabilities, remote administration, automation, customisation, and strong server ecosystem.

Is Linux important for cybersecurity?

Yes.

Linux is heavily used in cybersecurity, servers, cloud environments, networking, penetration testing, and security analysis.

Conclusion

Linux is one of the most important operating system technologies in modern computing.

Although it can look difficult at first, the basic Linux structure becomes much easier when you understand a few core concepts.

The most important foundation is:

User

↓

Application or Shell

↓

Linux System

↓

Kernel

↓

Hardware

Linux provides powerful control over:

  • Files
  • Users
  • Permissions
  • Processes
  • Services
  • Networking
  • Software packages
  • Hardware
  • Security

For beginners, the most important concepts to learn first are:

Linux Distribution → Terminal → Commands → File System → Users → Permissions → Packages → Processes → Services → Networking

Once these concepts are clear, advanced Linux topics become much easier.

Linux knowledge is especially valuable for anyone studying computer science, networking, cloud computing, programming, IT support, system administration, DevOps, servers, or cybersecurity.

Continue Learning