Introduction
If you have ever used a website, a smartphone, or a streaming service, you have almost certainly used Linux without knowing it. Linux is a free, open-source operating system that runs most of the world’s web servers, the cloud platforms behind our favourite apps, Android phones, routers, and even the fastest supercomputers. It matters because it is stable, secure, and flexible: anyone can inspect its code and shape it to fit a job, which is why it has become the backbone of modern IT.
Before actually starting out with Linux, I will admit the Linux terminal scared me. I was used to clicking icons and dragging files around, and a black screen with a blinking cursor felt like a place where one wrong word could break everything. I assumed the command line was reserved for “real” system administrators, and that I would spend more time memorising strange abbreviations than getting anything done. Working through the Basic Linux Commands changed that view. In this post, I walk you through the commands I learned, how they are used in real jobs, the challenges I faced, and how I plan to keep improving.
So, What Is a Command?
A command is simply an instruction you type to tell the computer what to do. Instead of double-clicking a folder to open it, you type a short word such as ls and press Enter. The terminal (also called the command line or shell) reads that instruction, runs it, and prints the result.
Most commands follow the same pattern: the command itself, optional options (also called flags) that change how it behaves, and arguments that say what to act on. In ls -l /home, ls is the command, -l is the option, and /home is the argument.
Running echo and date: your first commands and their output.
Anatomy of a command: the command, its option and its argument.
Once I understood this pattern, every new command felt less like a foreign word and more like a variation of something I already knew.
How We Will Explore the Commands
There are hundreds of Linux commands, so learning them as one long list would be overwhelming. To keep things manageable, I group the ones from this module into five categories:
- File System Navigation Commands:
ls,cd,pwd,mkdir,rm - File Management Commands:
cp,mv,touch,cat,grep - User & Permissions Commands:
sudo,usermod,chmod,chown - Process Management Commands:
ps,kill,top - Package Management Commands:
apt,yum,dnf
For each category, I first explain the idea behind it, then walk through its commands with examples.
1. File System Navigation Commands
The file system is how Linux organises everything stored on a computer. It is laid out as a tree that starts at a single root directory, written /, and navigation simply means moving around that tree and knowing where you are.
One idea made everything click for me: in Linux, everything is a file. Documents and images are files, of course, but so are directories (special files that list other files), hardware devices such as your keyboard or hard drive (found under /dev), and even information about running programs (found under /proc). Because everything is treated the same way, the same handful of commands works almost everywhere.
The Linux directory tree. Everything below / is a file.
-
pwd(print working directory) shows the directory you are in right now. -
lslists what is inside a directory.ls -laalso shows hidden files plus details such as size and permissions. -
cdchanges directory.cd /var/logjumps there,cd ..goes up one level, andcd ~returns to your home directory. -
mkdir projectscreates a new directory calledprojects. -
rm notes.txtdeletes a file, andrm -r old-folderdeletes a directory and everything inside it.
Moving around with pwd, ls, mkdir and cd.
A word of warning about rm: Linux has no recycle bin, so deleted files are gone for good.
rm deletes immediately, with no confirmation and no undo.
2. File Management Commands
File management means creating, copying, moving, renaming, reading and searching the files themselves. In a graphical interface you would do this with right-click menus and drag and drop. In the terminal, a few short commands do the same work, and they are fast and easy to automate.
-
touch notes.txtcreates an empty file (or updates the timestamp of an existing one). -
cp notes.txt backup.txtcopies a file, andcp -rcopies a whole directory. -
mv notes.txt documents/moves a file, whilemv old.txt new.txtrenames it. -
cat notes.txtprints a file’s contents on the screen. -
grep "error" server.logsearches a file and shows only the lines that contain the word “error.”
Creating, copying, moving and reading files with touch, cp, mv and cat.
grep shows only the lines that contain “error.”
3. User & Permissions Commands
A user is an account that can log in to and use the system. Every person, and many programs, run as a user, and users can be placed into groups. Linux is a multi-user system, so many people can share one machine at the same time.
Permissions exist to keep that sharing safe. They control who can read, write or execute each file, so one user cannot read another’s private data or break files that do not belong to them. A special account called root can do anything, which is why powerful actions are protected behind extra steps.
-
sudoruns a single command with administrator privileges, for examplesudo apt update. Use it only when you truly need it. -
usermodmodifies a user account.sudo usermod -aG docker aliceadds the user alice to thedockergroup. -
chmodchanges permissions.chmod 755 script.shgives the owner full access and everyone else read and execute. The numbers add up: read = 4, write = 2, execute = 1, so 7 = 4+2+1 and 5 = 4+1. -
chownchanges ownership.sudo chown alice:developers report.txtmakes alice the owner anddevelopersthe group.
Adding a user to a group with usermod, then confirming with groups.
Reading the permission string in ls -l output.
How chmod 755 is built from 4, 2 and 1.
4. Process Management Commands
A process is a program that is currently running. When you open a browser or start a web server, Linux creates a process for it and gives it a unique number called a process ID, or PID. Process management is about seeing what is running, how much CPU and memory each process uses, and stopping the ones that misbehave.
-
ps auxgives a snapshot of every running process, including its owner and PID. -
topshows a live, constantly updating view of CPU and memory usage. Pressqto quit. -
kill <PID>asks a process to stop politely, andkill -9 <PID>forces it to stop as a last resort.
The columns of ps aux, labelled.

Starting a background process, stopping it with kill and checking with ps.
5. Package Management Commands
A package is a bundle that contains a piece of software together with the information needed to install it, such as its version and the other packages it depends on. Package management is the practice of installing, updating and removing those bundles with a tool called a package manager, instead of downloading installers from random websites. It resolves dependencies automatically, pulls software from trusted repositories, and lets you update everything with a single command.
-
aptis used on Debian and Ubuntu.sudo apt updaterefreshes the list of available software,sudo apt install nginxinstalls a package, andsudo apt remove nginxremoves it. -
yumis the traditional tool on Red Hat-family systems such as CentOS and RHEL, for examplesudo yum install httpd. -
dnfis the modern successor toyumon Fedora and newer RHEL releases, with the same style of command:sudo dnf install httpd.
Package managers at a glance.
Real-World Application
These basic commands are the daily toolkit of many technology careers. In system administration, admins use ps, top, and grep to diagnose slow servers and read logs, useradd and usermod to manage accounts, and apt or dnf to patch software on schedule.
In cybersecurity, permissions are central. Using chmod and chown correctly enforces the principle of least privilege, so that sensitive files are not readable by everyone. Analysts also use grep to search authentication logs for suspicious login attempts, and ps to spot unexpected processes that might signal malware.
In DevOps, almost every automation script, CI/CD pipeline, and Docker container relies on these same commands. A deployment script might create directories with mkdir, copy build files with cp, set execute permissions with chmod, and restart a service after installing packages.
In cloud computing, most virtual machines on platforms like AWS, Azure, and Google Cloud run Linux and are managed over SSH, where there is no graphical interface at all. Being comfortable in the terminal is therefore not optional; it is the main way to configure and troubleshoot cloud servers.
Challenges & Takeaways
My biggest challenge was simply remembering the syntax and the many options. Commands such as chmod with numeric modes felt like a secret code at first, and I often mixed up the order of arguments in cp and mv. I also felt nervous using sudo and rm, since mistakes in the terminal are not always reversible. Another surprise was that package managers differ between distributions, so a command that worked on Ubuntu failed on a Red Hat-based system.
What helped was practising in a safe test environment, reading error messages carefully instead of panicking, and using man pages and the --help flag when I was stuck.
The most useful command for me was grep. Being able to search a large file for one word in a split second felt like a superpower, and it made me understand why administrators love the command line. The most exciting moment was seeing top update live and realising I could control what a computer was doing in real time.
Conclusion
Learning these commands took me from fearing the terminal to feeling curious and confident in it. I now understand how to navigate the filesystem, manage files, control permissions, monitor processes, and install software, which are the foundations for everything more advanced in Linux.
To keep improving, I plan to practise a little every day by using the terminal for routine tasks instead of the graphical interface. I will set up a Linux virtual machine to experiment safely, learn shell scripting to automate repetitive work, and explore tools like find, ssh, and cron. Eventually, I would like to build a small project, such as hosting a simple web server, to apply everything I have learned.













