Basic Linux Commands for Beginners (The 20 You'll Use Every Day)

The 20 Linux commands you'll use daily: Learn these, ignore the other 2,000.

There are thousands of Linux commands. You'll use about twenty of them nearly every time you log in. Learn these and the rest of this series will make sense.

Quick reference

CommandWhat it does
pwdShow which folder you're in
ls -laList files, including hidden ones, with details
cd folderGo into a folder (cd .. goes up, cd alone goes home)
cat fileShow a file's contents
less fileRead a long file a page at a time (q to quit)
cp a bCopy
mv a bMove or rename
rm fileDelete (no recycle bin!)
mkdir folderMake a folder

Finding your way around

pwd

Prints the folder you're in, such as /home/john. Your home folder is also written ~.

ls
ls -la

Lists what's here. -l gives the long view (size, owner, date), -a includes hidden files (the ones starting with a dot).

cd /etc
cd ..
cd

Changes folder. .. is the folder above; cd on its own takes you home. Press Tab while typing a name and the terminal finishes it for you — use this constantly.

Looking at files

cat file.txt
less /var/log/syslog
head -n 20 file.txt
tail -f /var/log/syslog

cat dumps the whole file. less lets you scroll (arrow keys, Space for a page, q to quit, /word to search). head shows the first lines, tail the last — and tail -f keeps watching as new lines arrive, which is perfect for logs. Ctrl + C stops it.

Copying, moving, deleting

cp report.txt report-backup.txt
cp -r photos photos-backup
mv old-name.txt new-name.txt
mv file.txt /home/john/documents/
rm file.txt
rm -r old-folder

-r means recursive — needed for folders. mv both moves and renames. There is no undo for rm: the file is gone. Never type rm -rf / or anything close to it.

Making things

mkdir projects
mkdir -p projects/2026/photos
touch notes.txt

-p creates the whole path in one go. touch creates an empty file.

Finding things

find / -name "*.log" 2>/dev/null
grep -r "error" /var/log/

find searches by name, grep searches inside files. The 2>/dev/null hides "permission denied" noise.

Getting help

man ls
ls --help

man opens the manual (press q to leave). --help gives a shorter summary.

Things that trip beginners up

Wrapping up

pwd, ls, cd to move; cat, less, tail to read; cp, mv, rm, mkdir to change things; man when stuck. Use Tab to complete names and the up arrow to repeat yourself. That's the whole foundation.

Call us