Linux Basic Commands

Linux Basic Commands

Verified Sources
Sep 1, 2026

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:

CategoryExample CommandsTypical Use
Navigationpwd, ls, cdMove around the filesystem
File Opstouch, mkdir, cp, mv, rmCreate, copy, move, delete
Permissionschmod, chown, chgrpAdjust access rights
Process Mgmtps, top, kill, bg, fgView and control running programs
System Infouname, uptime, free, dfQuery OS and resource usage
Networkingifconfig, ping, netstat, ssInspect network interfaces and connections
Package Mgmtapt, yum, dnf, pacmanInstall, update, remove software

These commands appear in virtually every Linux cheat sheet and are the building blocks for more advanced workflows 2.

Footnotes

  1. Linux Commands Cheat Sheet (ipcisco) – Comprehensive list of basic Linux commands with examples. 2

  2. Linux Commands Cheat Sheet – PhoenixNAP – Detailed descriptions and usage of file, process, and system commands.

  3. 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.

  1. 1
    Step 1

    Execute pwd to display the absolute path of the current directory. This establishes your starting point.

  2. 2
    Step 2

    Use ls to view files and sub‑directories. Add -a to include hidden items and -l for a detailed list.

  3. 3
    Step 3

    Run cd <target> to move. cd .. goes up one level, and cd ~ returns to the home directory.

  4. 4
    Step 4

    Invoke mkdir new_folder to create a directory. Use -p to create nested folders in one command.

  5. 5
    Step 5

    touch file.txt creates an empty file; nano file.txt or vim file.txt opens it for editing.

  6. 6
    Step 6

    cp source destination copies, while mv source destination moves or renames.

  7. 7
    Step 7

    "rm file.txt deletes a file; rm -r folder recursively removes a directory." 2

    Footnotes

    1. 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.

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

1971

First implementation of directory listing in the original UNIX system."

`chmod` Added

1978

Introduced to manage file permission bits."

`ps` and `top` Appear

1983

Early tools for viewing active processes."

GNU `bash` Released

1991

Bash becomes the default shell for many Linux distributions, standardizing command usage."

`git` Gains Popularity

2005

Version control transforms developer workflows; git dominates command‑line usage."

Footnotes

  1. 90+ Linux Commands frequently used by Linux Sysadmins – Curated list emphasizing sysadmin‑oriented commands and their typical scenarios.

Key Linux Terms

1 / 5
Question · Term

Shell

Click to reveal
Answer · Definition

A command‑line interpreter that reads user input and executes programs.

Knowledge Check

Question 1 of 5
Q1Single choice

Which command lists the contents of the current directory, including hidden files, in a detailed format?

Explore Related Topics

1

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.
2

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 1,2,3,4,1,2,5,1,2,3,4,51,2,3,4,1,2,5,1,2,3,4,5, FIFO yields 99 faults with 33 frames but 1010 faults with 44 frames.
  • Stack algorithms such as LRU or Optimal obey M(N,t)M(N+1,t)M(N,t)\subseteq M(N+1,t), guaranteeing that more frames never raise fault counts.
  • Designing a virtual‑memory system with stack‑based replacement eliminates Belady's Anomaly.
3

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 mode digit=4(read)+2(write)+1(execute)\text{mode digit}=4(\text{read})+2(\text{write})+1(\text{execute}).
  • Monitor processes and resources with ps, top, df, du, and free.
  • 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.