Basic Linux Command-Line

Here are 10 foundational Linux commands that demonstrate basic terminal competency:

  1. ls — List directory contents

bash
ls -la /home/user

  1. cd — Change directory

bash
cd /var/log

  1. pwd — Print working directory

bash
pwd

  1. cat — Display file contents

bash
cat /etc/os-release

  1. grep — Search text using patterns

bash
grep -i “error” /var/log/syslog

  1. chmod — Change file permissions

bash
chmod 755 script.sh

  1. ps — Display running processes

bash
ps aux | grep nginx

  1. sudo — Execute commands with elevated privileges

bash
sudo systemctl restart networking

  1. df — Report filesystem disk space usage

bash
df -h

  1. ssh — Securely connect to a remote host

bash
ssh user@192.168.1.100

Together these cover navigation (ls, cd, pwd), file inspection (cat, grep), permissions (chmod, sudo), system monitoring (ps, df), and remote access (ssh) — the core muscle memory for anyone comfortable at a Linux prompt.