Linux is one of the most powerful and widely used operating systems in the world. It powers everything from personal computers and servers to cloud infrastructure, embedded systems, and even Android smartphones. Because of its stability, flexibility, and open-source nature, Linux has become the foundation of modern cybersecurity, system administration, and DevOps environments.
For cybersecurity professionals, understanding Linux is essential. Many security tools, penetration testing frameworks, and server infrastructures run on Linux-based systems. In this article, we will explore the fundamentals of Linux, including its philosophy, filesystem structure, essential commands, networking tools, and basic system operations.
Think of this guide as your first driving lesson with Linux—understanding how the system works before diving into advanced security or administration tasks.
Linux Philosophy
Linux was designed with several guiding principles that make it powerful, modular, and efficient.
Everything is a File
In Linux, nearly everything is represented as a file. This includes:
hardware devices
processes
network connections
system configuration data
Because of this design, users can interact with system components using standard file tools such as cat, ls, and echo.
Small, Single-Purpose Programs
Linux encourages the use of small tools that do one job well.
Examples include:
grep– search textls– list filescat– display file contents
Instead of one large program doing everything, Linux uses many small utilities that work together.
Ability to Chain Programs Together
Linux commands can be combined using pipes (|) to perform complex operations.
Example:
cat file.txt | grep passwordThis command reads a file and filters lines containing the word password.
Avoid Captive User Interfaces
Linux is designed to be controlled primarily through the command line interface (CLI). The command line provides greater control, automation capabilities, and flexibility compared to graphical interfaces.
Configuration Stored in Text Files
Most Linux configuration is stored in readable text files.
For example:
/etc/passwdThis file contains information about system users.
This design makes configuration easy to edit, automate, and back up.
Linux File System Structure
Linux uses a hierarchical directory structure that begins with the root directory /.
Everything in the system is located somewhere under this root directory.
/
├── bin
├── boot
├── dev
├── etc
├── home
├── lib
├── media
├── mnt
├── opt
├── root
├── sbin
├── tmp
├── usr
└── varBelow are some of the most important directories.
/ (Root Directory)
The root directory is the top level of the entire filesystem. All other directories and files are located beneath it.
/bin
Contains essential binary commands used by all users.
Examples:
lscpmvcat
/boot
Contains files required for the system to boot, including:
the Linux kernel
bootloader files
/dev
Stores device files representing hardware devices connected to the system, such as:
hard drives
USB devices
terminals
/etc
Contains system configuration files.
Examples include:
network configuration
user account settings
service configuration
/home
Each user on the system has a personal directory inside /home.
Example:
/home/john
/home/adminUsers store their personal files here.
/lib
Contains shared libraries required by system programs.
/media
Used for mounting removable devices such as:
USB drives
external hard drives
CDs/DVDs
/mnt
Temporary mount point used for manually mounted filesystems.
/opt
Used for installing optional third-party software.
/root
Home directory for the root (administrator) user.
/sbin
Contains system administration commands used primarily by the root user.
/tmp
Stores temporary files used by programs.
Files in this directory are often cleared automatically during system boot.
/usr
Contains user utilities, libraries, and documentation.
This directory holds most installed applications.
/var
Stores variable data that changes frequently.
Examples include:
log files
mail storage
web server files
cron jobs
Popular Linux Distributions
Linux comes in many versions known as distributions (distros). Each distribution is designed for specific use cases.
Some popular distributions include:
Ubuntu
One of the most beginner-friendly Linux distributions. Widely used for desktops and servers.
Debian
A highly stable distribution known for reliability and security.
Fedora
A cutting-edge distribution that introduces new technologies early.
CentOS / Rocky Linux
Enterprise-grade distributions often used on servers.
Kali Linux
A security-focused distribution used for penetration testing and ethical hacking.
Parrot OS
Another security and privacy-focused Linux distribution.
Raspberry Pi OS
Designed specifically for Raspberry Pi devices.
Introduction to the Linux Shell
The Linux shell is a command-line interface that allows users to interact directly with the operating system.
The shell acts as an intermediary between the user and the Linux kernel.
Users can execute commands, manage files, control processes, and configure the system using the terminal.
Example terminal command:
lsThis command lists files and directories in the current location.
Basic Linux Command Syntax
Most Linux commands follow this structure:
command [options] [arguments]Example:
ls --helpThis command displays help information for the ls command.
System Information Commands
Linux provides many commands to gather information about the system.
Display Current User
whoamiShows the username currently logged in.
Show User Identity
idDisplays user ID and group information.
Display Hostname
hostnameShows the name of the current system.
Show Operating System Information
unameDisplays system information such as kernel version.
Show Current Directory
pwdPrints the current working directory.
Networking Commands
Linux provides powerful networking tools.
Ping
The ping command checks connectivity between systems.
Example:
ping 8.8.8.8This sends ICMP packets to Google's DNS server and displays response times.
Traceroute
traceroute shows the path packets take to reach a destination.
Example:
traceroute example.comThis helps identify network routing paths.
Netstat
Displays active network connections and ports.
netstat -aUseful for monitoring network activity.
IP Command
The ip command manages network interfaces and routing.
Example:
ip aShows IP address information.
SSH (Secure Shell)
SSH is a protocol used to securely connect to remote systems.
System administrators and cybersecurity professionals commonly use SSH to manage servers remotely.
Example connection:
ssh username@IP_addressOnce connected, you can execute commands on the remote system.
File Management in Linux
Linux provides commands to create, move, rename, and delete files.
Create a File
touch info.txtCreates an empty file named info.txt.
Create a Directory
mkdir StorageCreates a directory called Storage.
Rename or Move Files
mv info.txt information.txtRenames a file.
Example move:
mv information.txt Storage/Moves the file into the directory.
User Management Commands
Linux allows administrators to manage user accounts.
Create a User
useradd usernameCreates a new user account.
Delete a User
userdel usernameRemoves a user account.
Change Password
passwd usernameUpdates the user's password.
Switch User
suSwitches to another user (usually root).
Run Command as Administrator
sudo commandExecutes a command with administrative privileges.
Package Management
Linux uses package managers to install and manage software.
APT
Used in Debian-based systems like Ubuntu.
Example:
sudo apt install package_nameDPKG
Low-level package management tool for Debian packages.
Snap
Installs containerized applications that work across multiple distributions.
Pip
Python package installer.
Example:
pip install requestsGit
A distributed version control system used to manage source code.
Example:
git clone repository_urlUseful Terminal Shortcuts
Linux terminals support keyboard shortcuts to improve productivity.
Auto-Complete
TABCompletes commands and filenames automatically.
Move Cursor
CTRL + AMove to beginning of line.
CTRL + EMove to end of line.
Clear Terminal
CTRL + LClears the terminal screen.
Stop a Running Process
CTRL + CTerminates the current process.
Search Command History
CTRL + R








Comments (0)