Essential Linux Commands Every Beginner Should Know

linuxsystemsbeginner

Linux runs the internet — most servers, containers, and security tools live on it. The good news: you don’t need to memorize thousands of commands. A couple dozen cover the vast majority of real work. Here are the essentials, grouped by what you’re trying to do.

Getting around

  • pwd — print the current directory (“where am I?”)
  • ls -lah — list files, including hidden ones, with sizes and permissions
  • cd /path/to/dir — change directory (cd .. goes up, cd ~ goes home)

Working with files

  • cat file — print a file’s contents
  • less file — scroll through a long file (press q to quit)
  • cp source dest — copy; mv source dest — move or rename
  • rm file — delete (be careful; there’s no recycle bin)
  • mkdir newdir — make a directory
  • touch file — create an empty file or update its timestamp

Finding things

  • grep "pattern" file — search for text inside a file
  • grep -r "pattern" . — search recursively through a folder
  • find . -name "*.log" — find files by name
  • history — see commands you’ve run

grep is one of the most powerful tools you’ll use — it’s how you find the needle in a log file haystack.

Permissions (the thing that confuses everyone)

Linux permissions control who can read, write, and execute a file. ls -l shows them like -rwxr-xr--:

  • First the owner’s permissions, then the group’s, then everyone else’s
  • r = read, w = write, x = execute

Change them with:

  • chmod 755 script.sh — common for scripts (owner full, others read+execute)
  • chown user:group file — change ownership

Understanding permissions is essential for both sysadmin work and security.

Processes and system

  • ps aux — list running processes
  • top (or htop) — live view of CPU/memory usage
  • kill <PID> — stop a process by its ID
  • df -h — disk space; free -h — memory usage
  • systemctl status <service> — check a service (e.g. nginx, ssh)

Networking

  • ip a — show your network interfaces and IP addresses
  • ping host — test reachability
  • ss -tulpn — show listening ports and which process owns them
  • curl https://example.com — fetch a URL from the command line

Superpowers: pipes and redirection

The real magic is combining commands:

  • | (pipe) sends one command’s output into another: ps aux | grep nginx
  • > writes output to a file: ls > files.txt
  • >> appends instead of overwriting

This composability is why the Linux command line is so powerful — small tools, chained together, solve big problems.

The fastest way to get comfortable

You won’t remember these by reading them — you’ll remember them by typing them. The best approach is a real Linux environment where you can experiment freely without breaking anything important. On Learn.GT, you can practice Linux hands-on in interactive labs, with guidance and an AI tutor when a command doesn’t do what you expected.

Start with these, use them daily, and within a few weeks the command line stops being scary and starts being the fastest way to get things done.