Start with about 20 commands. With pwd, ls, cd, cat, grep, chmod, sudo, ps, systemctl, ssh, curl and apt, plus a few more below, you can find your way around a Linux server, read its logs, fix file access, check what is running and install software. Learn them by job, not in alphabetical order.
The terminal is the text window where you type these commands. On a server there is usually no screen and no mouse, so the terminal is all you have. The examples here work on Ubuntu, one of the most common Linux versions for beginners.
Moving around
| Command | What it does |
|---|---|
pwd | Shows which folder you are in right now. |
ls -la | Lists the files in a folder, including hidden ones, with their owner and size. |
cd /var/log | Moves you into a folder. cd .. goes up one level, and cd ~ takes you home. |
Files and folders
| Command | What it does |
|---|---|
mkdir notes | Makes a new folder. |
cp a.txt b.txt | Copies a file. Add -r to copy a whole folder. |
mv a.txt notes/ | Moves a file, or renames it if you give a new name. |
rm a.txt | Deletes a file. There is no recycle bin, so check twice. |
cat file.txt | Prints a short file to the screen. |
less file.txt | Opens a long file one page at a time. Press q to quit. |
tail -f app.log | Shows the end of a file and keeps showing new lines as they arrive. Good for watching logs live. |
grep error app.log | Finds every line that contains a word. |
find / -name "*.conf" | Searches for files by name, starting from a folder you choose. |
The | sign, called a pipe, sends the output of one command into the next. For example, cat app.log | grep error shows only the error lines. Pipes are where the terminal starts to feel fast.
Permissions
Every file on Linux has an owner and a set of rights: who can read it, change it or run it. Many beginner errors are really permission errors.
| Command | What it does |
|---|---|
sudo | Runs one command as the admin user. Use it only when you need to. |
chmod +x script.sh | Changes a file's rights. This example lets the file run as a program. |
chown user:group file | Changes who owns a file. |
Processes and services
A process is a program that is running. A service is a program that runs in the background, like a web server.
| Command | What it does |
|---|---|
ps aux | Lists every running process. |
top | Shows live CPU and memory use, so you can spot what is slowing the machine. |
kill 1234 | Stops the process with that number (its process ID). |
systemctl status nginx | Shows whether a service is running. Use start, stop or restart in place of status to control it. |
journalctl -u nginx | Shows the logs of one service. |
Networking
| Command | What it does |
|---|---|
ssh user@server | Logs you in to another computer safely over the network. |
ping google.com | Checks whether another machine answers at all. |
curl -v https://example.com | Sends a web request and shows the full reply, headers included. |
ss -tlnp | Lists the ports your machine is listening on, and which program owns each one. |
Installing software
| Command | What it does |
|---|---|
sudo apt update | Refreshes the list of software you can install. |
sudo apt install nginx | Installs a program, here the Nginx web server. |
Other Linux versions use other package tools, such as dnf. The idea is the same.
Getting help
Type man and a command name, for example man grep, to read its manual. Most commands also print a short guide with --help. AI tools are good at explaining a command, but try anything they suggest on a practice machine first, never on a live server.
How to practise
Reading this list will not make the commands stick. Typing them will. Set up a free practice machine: WSL on Windows, a virtual machine, or a small cloud server. Then give yourself small tasks. Find every error in a log. Make a script and let it run. Install Nginx and check that it is listening on port 80.
Do a little every day. After a couple of weeks, most of these commands will come without thinking.
Where we teach Linux
We teach Linux inside three courses: Cloud Computing & DevOps, Cybersecurity & Ethical Hacking and Backend Engineering. Our Linux training page explains what each one covers and how to choose.





