Linux Basic Commands
Understanding the fundamentals of the Linux command‑line is essential for any system administrator, developer, or power user. The Terminal provides direct access to the Shell and the underlying Filesystem 2. Mastery of a core set of commands enables efficient navigation, file manipulation, process control, and system monitoring.
Below is a high‑level overview of the most commonly used command categories:
| Category | Example Commands | Typical Use |
|---|---|---|
| Navigation | pwd, ls, cd | Move around the filesystem |
| File Ops | touch, mkdir, cp, mv, rm | Create, copy, move, delete |
| Permissions | chmod, chown, chgrp | Adjust access rights |
| Process Mgmt | ps, top, kill, bg, fg | View and control running programs |
| System Info | uname, uptime, free, df | Query OS and resource usage |
| Networking | ifconfig, ping, netstat, ss | Inspect network interfaces and connections |
| Package Mgmt | apt, yum, dnf, pacman | Install, update, remove software |
These commands appear in virtually every Linux cheat sheet and are the building blocks for more advanced workflows 2.
Footnotes
-
Linux Commands Cheat Sheet (ipcisco) – Comprehensive list of basic Linux commands with examples. ↩ ↩2
-
Linux Commands Cheat Sheet – PhoenixNAP – Detailed descriptions and usage of file, process, and system commands. ↩
-
Linux commands cheat sheet | Red Hat Developer – Essential commands for developers, including permission and package management utilities. ↩
Introduction to Linux and Basic Linux Commands for Beginners
Frequency of Top Linux Commands (2025 Survey Data)
Based on Stack Overflow Developer Survey 2025 and shell‑history analyses.
Navigating the Filesystem with Basic Commands
- 1Step 1
Execute
pwdto display the absolute path of the current directory. This establishes your starting point. - 2Step 2
Use
lsto view files and sub‑directories. Add-ato include hidden items and-lfor a detailed list. - 3Step 3
Run
cd <target>to move.cd ..goes up one level, andcd ~returns to the home directory. - 4Step 4
Invoke
mkdir new_folderto create a directory. Use-pto create nested folders in one command. - 5Step 5
touch file.txtcreates an empty file;nano file.txtorvim file.txtopens it for editing. - 6Step 6
cp source destinationcopies, whilemv source destinationmoves or renames. - 7Step 7
"
rm file.txtdeletes a file;rm -r folderrecursively removes a directory." 2Footnotes
-
Linux Commands Cheat Sheet (ipcisco) – Comprehensive list of basic Linux commands with examples. ↩
-
Linux Commands Cheat Sheet – PhoenixNAP – Detailed descriptions and usage of file, process, and system commands. ↩
-
Frequently Asked Questions
Pro Tip
Combine commands with pipes (|) to chain output directly into the next command, e.g., ls -l | grep '^d' lists only directories.
Caution
Avoid using rm -rf / unless you truly intend to erase the entire filesystem. The --no-preserve-root flag disables safety checks.
Evolution of Core Linux Commands
UNIX `ls` Introduced
1971First implementation of directory listing in the original UNIX system."
`chmod` Added
1978Introduced to manage file permission bits."
`ps` and `top` Appear
1983Early tools for viewing active processes."
GNU `bash` Released
1991Bash becomes the default shell for many Linux distributions, standardizing command usage."
`git` Gains Popularity
2005Version control transforms developer workflows; git dominates command‑line usage."
Footnotes
-
90+ Linux Commands frequently used by Linux Sysadmins – Curated list emphasizing sysadmin‑oriented commands and their typical scenarios. ↩
Key Linux Terms
Knowledge Check
Which command lists the contents of the current directory, including hidden files, in a detailed format?
Explore Related Topics
Master Class: Kubernetes Fundamentals
Kubernetes is the industry‑standard platform for orchestrating containerized microservices, separating cluster management (Control Plane) from workload execution (Worker Nodes) and emphasizing declarative, version‑controlled deployments.
- The Control Plane (kube‑apiserver, etcd, scheduler, controller‑manager) stores the cluster’s desired state and makes global scheduling decisions.
- Worker nodes run kubelet, kube‑proxy, and a container runtime to host Pods and enforce networking rules.
- Core Kubernetes objects—Pods, Services, and Deployments—enable self‑healing, stable networking, and scalable rollouts.
- Declarative YAML manifests (
kubectl apply) support IaC and GitOps, while imperative commands are discouraged. - Production workloads should use higher‑level abstractions (Deployments/StatefulSets) instead of bare Pods to ensure resilience.
Understanding Belady's Anomaly in Operating Systems
Belady's Anomaly shows that, for some page‑replacement policies, adding more physical frames can increase the number of page faults.
- FIFO (a non‑stack algorithm) does not satisfy the inclusion property and can exhibit the anomaly.
- On the reference string , FIFO yields faults with frames but faults with frames.
- Stack algorithms such as LRU or Optimal obey , guaranteeing that more frames never raise fault counts.
- Designing a virtual‑memory system with stack‑based replacement eliminates Belady's Anomaly.
Learn Linux in 30 Days
A 30‑day curriculum guides beginners to practical Linux fluency by progressing from core navigation to system control and automation.
- Master filesystem commands (
pwd,ls,cd,cp,mv,rm) and hierarchical paths. - Understand and set permissions using
chmod/chown, with numeric mode computed as . - Monitor processes and resources with
ps,top,df,du, andfree. - Install, update, and remove software via APT (Debian/Ubuntu) or DNF (Fedora/Red Hat).
- Build Bash scripts, chain tools with pipes, and schedule recurring jobs using
cron.