Essential Linux Commands Every Beginner Should Know
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 permissionscd /path/to/dir— change directory (cd ..goes up,cd ~goes home)
Working with files
cat file— print a file’s contentsless file— scroll through a long file (pressqto quit)cp source dest— copy;mv source dest— move or renamerm file— delete (be careful; there’s no recycle bin)mkdir newdir— make a directorytouch file— create an empty file or update its timestamp
Finding things
grep "pattern" file— search for text inside a filegrep -r "pattern" .— search recursively through a folderfind . -name "*.log"— find files by namehistory— 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 processestop(orhtop) — live view of CPU/memory usagekill <PID>— stop a process by its IDdf -h— disk space;free -h— memory usagesystemctl status <service>— check a service (e.g.nginx,ssh)
Networking
ip a— show your network interfaces and IP addressesping host— test reachabilityss -tulpn— show listening ports and which process owns themcurl 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.