Linux

25 Essential Linux Commands for Beginners (With Simple Examples)

By adminNovember 30, 2026 3 min read

The Linux terminal looks scary at first, but about 25 commands cover most daily work. This beginner-friendly guide explains the essential Linux commands with simple examples you can try right now on Ubuntu, Debian, Fedora or any other distribution.

Navigation Commands

Command What it does Example
pwd Shows your current folder pwd
ls Lists files and folders ls -lah
cd Changes folder cd /var/log

Tip: cd .. goes one level up, and cd ~ goes to your home folder.

File and Folder Commands

Command What it does Example
mkdir Creates a folder mkdir projects
touch Creates an empty file touch notes.txt
cp Copies files cp notes.txt backup.txt
mv Moves or renames mv notes.txt docs/
rm Deletes files rm old.txt

Warning: rm has no recycle bin. Be very careful with rm -r, and never run rm -rf / or commands you do not understand.

Viewing and Searching Files

  • cat file.txt shows the whole file.
  • less file.txt lets you scroll through a long file (press q to quit).
  • head -n 10 file.txt shows the first 10 lines.
  • tail -f /var/log/syslog follows a log live. Very useful for troubleshooting.
  • grep "error" file.txt finds lines that contain a word.
  • find /home -name "*.pdf" searches for files by name.

System Information Commands

  • uname -a shows kernel and system details.
  • df -h shows disk space in a readable format.
  • free -h shows memory usage.
  • top or htop shows running processes live.
  • uptime shows how long the system has been running.

User and Permission Commands

  • whoami shows your username.
  • sudo command runs a command with administrator rights.
  • chmod 755 script.sh changes file permissions.
  • chown user:group file changes the file owner.

Understanding chmod Numbers

Number Permission
4 Read
2 Write
1 Execute

Add them together. For example, 7 = 4+2+1 (read, write, execute) and 5 = 4+1 (read, execute). So 755 means the owner can do everything, and others can read and run.

Package Management

On Ubuntu and Debian:

sudo apt update
sudo apt upgrade
sudo apt install nginx
sudo apt remove nginx

On Fedora and RHEL-based systems, use dnf instead of apt.

Networking Commands

  • ip a shows IP addresses and interfaces.
  • ping google.com tests connectivity.
  • ss -tulpn shows listening ports and the programs using them.
  • curl -I https://example.com fetches response headers from a website.
  • ssh user@server-ip logs in to a remote server securely.

Process Management

  • ps aux lists all processes.
  • kill PID stops a process politely.
  • kill -9 PID forces a process to stop (use as a last option).
  • systemctl status ssh checks a service.
  • sudo systemctl restart ssh restarts a service.

Useful Time-Savers

  • Press Tab to auto-complete names.
  • Press the Up arrow to repeat earlier commands.
  • Press Ctrl + C to stop a running command.
  • Use man command to read the manual of any command.
  • Use history to see your past commands.

Practice Plan for Beginners

  1. Install Ubuntu in a virtual machine or homelab so you cannot break your main PC.
  2. Spend 20 minutes a day practising 5 commands.
  3. Create a folder, add files, copy, move and delete them.
  4. Install a web server and check its logs with tail -f.
  5. Write a small shell script that backs up a folder.

Frequently Asked Questions

Which Linux distribution is best for beginners?

Ubuntu, Linux Mint and Fedora Workstation are all friendly choices with good documentation.

Do I need to memorise all commands?

No. Learn the basics, and use man, --help and search engines for the rest.

What is the difference between sudo and root?

Root is the administrator account. sudo lets a normal user run single commands with root power, which is safer than staying logged in as root.

Is Linux useful for IT jobs?

Yes. Most servers, cloud virtual machines, containers and network appliances run Linux, so these commands appear in cloud, DevOps and security work every day.

Conclusion

You do not need to learn hundreds of commands. Master these 25, practise daily in a safe virtual machine, and you will be comfortable on any Linux server.

Categories: Linux