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.txtshows the whole file.less file.txtlets you scroll through a long file (press q to quit).head -n 10 file.txtshows the first 10 lines.tail -f /var/log/syslogfollows a log live. Very useful for troubleshooting.grep "error" file.txtfinds lines that contain a word.find /home -name "*.pdf"searches for files by name.
System Information Commands
uname -ashows kernel and system details.df -hshows disk space in a readable format.free -hshows memory usage.toporhtopshows running processes live.uptimeshows how long the system has been running.
User and Permission Commands
whoamishows your username.sudo commandruns a command with administrator rights.chmod 755 script.shchanges file permissions.chown user:group filechanges 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 ashows IP addresses and interfaces.ping google.comtests connectivity.ss -tulpnshows listening ports and the programs using them.curl -I https://example.comfetches response headers from a website.ssh user@server-iplogs in to a remote server securely.
Process Management
ps auxlists all processes.kill PIDstops a process politely.kill -9 PIDforces a process to stop (use as a last option).systemctl status sshchecks a service.sudo systemctl restart sshrestarts 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 commandto read the manual of any command. - Use
historyto see your past commands.
Practice Plan for Beginners
- Install Ubuntu in a virtual machine or homelab so you cannot break your main PC.
- Spend 20 minutes a day practising 5 commands.
- Create a folder, add files, copy, move and delete them.
- Install a web server and check its logs with
tail -f. - 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.




