Beginner learning Ubuntu terminal commands on a laptop with cheat sheet notes

The terminal looks intimidating — a black window, a blinking cursor, no buttons to click. But the Ubuntu terminal commands cheat sheet for beginners is shorter than you think: about 25 commands cover 95 percent of what a beginner ever needs. This guide explains each command in plain language, shows a real example you can try right now, and groups everything by task so you can find what you need in seconds. Bookmark this page and keep it open the next time you follow any Linux tutorial.

In This Guide

Opening the Terminal and How It Works

PUbuntu terminal window showing common Linux commands like ls cd and grepress Ctrl + Alt + T anywhere in Ubuntu and a terminal appears. The prompt looks something like user@laptop:~$ — that is your username, computer name, and current directory (~ means your home folder). The $ means you are a normal user; a # would mean root.

A command has three parts: the program (ls), optional flags that modify behavior (-l), and optional arguments like a file or folder name. Flags almost always start with a dash. When a tutorial shows a $ at the start of a line, do not type it — it just represents the prompt.

Two safety notes before you type anything. First, the terminal does exactly what you tell it — there is no recycle bin for rm. Second, commands prefixed with sudo (“superuser do”) run with administrator power and will ask for your password. Use sudo deliberately, never on commands you do not understand.

Everything in Linux is a file path starting from the root /. These three commands are your compass:

pwd — print working directory

pwd
/home/user/Documents

Shows the full path of where you currently are. When you feel lost, run pwd.

ls — list directory contents

ls
ls -l
ls -la

Plain ls lists files and folders. ls -l adds details (permissions, owner, size, date). ls -la also reveals hidden files — those starting with a dot, like .bashrc, which store your settings.

cd — change directory

cd Documents
cd ..
cd ~
cd /var/log

cd Documents moves into a subfolder, cd .. goes up one level, cd ~ jumps home, and cd - hops back to the previous directory you were in. Combine with tab-completion (press Tab to auto-finish names) and navigation becomes fast.

Working With Files and Folders

mkdir — make a directory

mkdir projects
mkdir -p projects/website/images

The -p flag creates nested folders in one go and does not complain if they already exist.

touch — create an empty file

touch notes.txt

Creates a blank file instantly. Also updates a file’s timestamp if it already exists — handy in scripts.

cp — copy files and folders

cp notes.txt backup.txt
cp -r projects projects-backup

The -r (recursive) flag is required when copying folders. Beginners often forget it and wonder why nothing happened.

mv — move or rename

mv notes.txt archive/
mv old-name.txt new-name.txt

Linux has no separate rename command — moving a file to a new name in the same folder is renaming.

rm — remove (delete)

rm notes.txt
rm -r old-project

Deleted files do not go to the trash. They are gone. Double-check paths before pressing Enter, especially with -r. When in doubt, ls the path first.

Viewing and Searching File Contents

cat — print a whole file

cat notes.txt

Dumps the entire file to the screen. Great for short files; overwhelming for long ones.

less — scroll through a file

less /var/log/syslog

Opens the file in a pager: arrow keys scroll, /word searches, q quits. Use this instead of cat for anything longer than a screen.

head and tail — see the start or end

head -20 notes.txt
tail -30 /var/log/syslog
tail -f /var/log/syslog

tail -f (“follow”) keeps showing new lines as they are written — perfect for watching live logs while debugging.

grep — search inside files

grep "error" /var/log/syslog
grep -r "TODO" ~/projects
grep -i "warning" log.txt

grep finds lines containing your text. -r searches recursively through folders, -i ignores case. Pipe any command’s output into grep to filter it: ls -la | grep ".txt".

find — locate files by name

find ~ -name "*.pdf"
find /etc -name "hosts" 2>/dev/null

Searches the filesystem for filenames matching a pattern. The 2>/dev/null hides “permission denied” noise when searching system folders.

Permissions: Who Can Do What

Every file has permissions for three groups: the owner, the group, and others. ls -l shows them as -rwxr-xr-- (read, write, execute). These commands manage them:

chmod — change permissions

chmod +x script.sh
chmod 644 document.txt

chmod +x makes a script executable — you will use this constantly when installing tar.gz files in Ubuntu that ship installer scripts. The numeric form (644, 755) sets exact permissions; 755 is standard for scripts, 644 for regular files.

chown — change ownership

sudo chown user:user file.txt

Transfers file ownership to a user (and optionally group). Needs sudo because you are giving away control of the file.

sudo — run as administrator

sudo apt update
sudo !!

The trick sudo !! re-runs your previous command with sudo — a lifesaver when you forget the prefix and get “permission denied.”

User and permission management goes deeper than one cheat sheet. For the full workflow of adding accounts and granting sudo rights, see our guide on creating a new user in the Ubuntu terminal.

Installing and Updating Software

Ubuntu’s APT package manager handles installation, updates, and removal from trusted repositories:

sudo apt update
sudo apt upgrade
sudo apt install vlc
sudo apt remove vlc
apt search "video editor"

update refreshes the list of available packages (run it before installing anything new), upgrade installs newer versions of what you have, install/remove add or drop programs, and search finds packages by keyword. Note search does not need sudo — it only reads.

System Info and Process Management

See what your machine is doing

df -h
free -h
top

df -h shows disk space per drive, free -h shows RAM usage, and top opens a live view of running processes sorted by CPU (press q to exit; htop is a friendlier alternative if installed).

Manage processes

ps aux | grep firefox
kill 12345
kill -9 12345

Find a stuck program’s process ID with ps, ask it to quit politely with kill, and only use kill -9 (force kill, no cleanup) when it refuses to die.

Shutdown and reboot

sudo reboot
sudo shutdown now
sudo shutdown +10 "Rebooting for updates"

Handy Network Commands

ping -c 4 google.com
ip addr show
curl -I https://example.com

ping tests connectivity (-c 4 sends exactly 4 packets instead of running forever), ip addr show lists your network interfaces and IP addresses (the modern replacement for the retired ifconfig), and curl fetches web content — here just the headers with -I, useful for checking whether a site responds.

Terminal Shortcuts That Save You Daily

Commands are only half the story. These keyboard shortcuts multiply your speed:

  • Tab — auto-complete file and command names. Press twice to see all matches.
  • Up / Down arrows — cycle through command history.
  • Ctrl + R — reverse-search your history. Type part of an old command and it appears.
  • Ctrl + C — stop the current command dead. Your emergency brake.
  • Ctrl + L — clear the screen (same as the clear command).
  • Ctrl + U — delete everything before the cursor on the current line.
  • Ctrl + D — close the terminal (logs you out of the shell).

And two shell superpowers worth learning early: pipes (|) feed one command’s output into another (ps aux | grep firefox), and redirection (>) saves output to a file (ls -la > listing.txt). Most “advanced” one-liners are just these two ideas stacked together.

The official Ubuntu command line tutorial for beginners is an excellent follow-up once you are comfortable with the commands above.

Frequently Asked Questions

How many terminal commands do I actually need to memorize?

About a dozen for daily life: cd, ls, pwd, mkdir, cp, mv, rm, cat, grep, sudo, apt, and chmod. Everything else you can look up when you need it — even professionals google flags constantly.

What does “permission denied” mean?

You tried to do something your user account is not allowed to do — usually writing to a system folder or running a non-executable file. Prefix with sudo for system tasks, or chmod +x for scripts. Never “fix” it by recursively chmodding system directories.

Why does the terminal not show my password when I type it?

That is intentional. Sudo hides password input completely — no dots, no asterisks. Type it normally and press Enter. It is working even though the cursor does not move.

How do I paste into the terminal?

Ctrl + Shift + V (regular Ctrl + V means something else in the terminal). Copy is Ctrl + Shift + C. Right-click paste also works in most terminal apps.

What is the difference between the terminal, console, and shell?

Roughly: the terminal is the app window, the shell (usually Bash on Ubuntu) is the program inside it that interprets your commands, and console is an older term people use interchangeably with terminal. For beginners, they all mean “the black window where you type commands.”

Key Takeaways

  • pwd, ls, and cd handle all navigation; mkdir, cp, mv, rm handle files — with rm, there is no undo.
  • cat/less view files, grep searches inside them, find locates them by name.
  • chmod +x makes scripts runnable; sudo grants admin power — use it deliberately.
  • sudo apt update && sudo apt upgrade keeps your system current; apt search finds new software.
  • Learn Tab-completion, Ctrl + R history search, and Ctrl + C — they save more time than any command.
  • When stuck, every command has a built-in manual: man ls or ls --help.

Conclusion

This Ubuntu terminal commands cheat sheet for beginners gives you the 25 commands that handle nearly everything a newcomer needs: moving around, managing files, reading logs, fixing permissions, and installing software. You do not need to memorize them all today — keep this page bookmarked, practice the navigation trio (pwd, ls, cd) until they feel automatic, and add the rest as real tasks demand them. The terminal stops being scary the moment it starts saving you time, and with these commands in your pocket, that moment comes fast.

Leave a Reply

Your email address will not be published. Required fields are marked *