Skip to main content

Linux 101

A hands-on first hour with Linux: what it is, which distribution to start with, how to open a terminal, and the first 10 commands to try.

Updated 11 min readMarkdown
Linux 101

Linux looks intimidating from the outside because most introductions start with history and stop before you can do anything. This one does the opposite. The history fits in a few paragraphs, and the rest is practice: open a terminal, run 10 commands, install one program, and learn how to get help when you are stuck.

By the end you will be able to move around the file system, create and read files, copy and delete them safely, and install software on the three main distribution families.

What Linux actually is

Linux was first released in 1991 by Linus Torvalds. Strictly speaking, Linux is the kernel: the core program that talks to the hardware and lets other software use the processor, memory, disks and network.

The system you sit down and use is more than the kernel. Many of the everyday tools that come with it, such as the shell and the core file commands, come from the GNU Project. That is why the full system is often called GNU/Linux.

A distribution, or distro, is one packaged version of that system. It combines the kernel and the GNU tools with a package manager, default settings and a set of included programs, all maintained by a company or a community.

Linux now runs most web servers, almost all supercomputers, Android phones, home routers, and a lot of desktops and laptops. The commands in this post work the same way in almost all of those places.

Free means freedom, not only free of cost

Linux grew around the idea that software should be free. In this context, free means freedom first: the freedom to use the software, study how it works, change it, and share your changes with others.

The GNU General Public License, or GPL, is the licence that protects those freedoms for the Linux kernel.

Free of cost is a common side effect, but it is not the definition. Companies sell Linux support contracts, hosted Linux servers and Linux based products, and that is still Linux. When you read free software, read it as free to use and change, not only free to download.

Which distribution should you start with

You do not need to pick the perfect distro. You need one that is common, well documented and easy to search for help with. In 2026, most beginners will meet one of these three families.

Family Good first choice Package manager
Debian Ubuntu, Linux Mint, Debian apt
Red Hat Fedora, Rocky Linux, AlmaLinux dnf
Arch Arch Linux, Manjaro pacman

A note on names you may see in older tutorials: CentOS Linux reached end of life in Dec 2021. Do not install it for new learning. Its common replacements are Rocky Linux and AlmaLinux, and there is also CentOS Stream, which is a different, upstream project. Slackware still exists, but it is a niche choice and not where most beginners start today.

If you are learning for work, match the family your workplace uses. If you are learning for yourself, pick Ubuntu. You will find the most beginner help for it, and everything you learn transfers to the other families except the package manager commands.

How to start without replacing your computer

You do not need a spare laptop or a dual boot setup for the first hour. Pick whichever option fits what you already have.

  • On Windows: WSL. Windows Subsystem for Linux, or WSL, runs Ubuntu inside Windows. Install it from an administrator PowerShell window, restart, then open Ubuntu from the Start menu.
wsl --install -d Ubuntu
  • On any computer: a virtual machine. Install a free tool such as VirtualBox, create a virtual machine, and install Ubuntu inside it. Your real system is untouched, and you can delete the virtual machine when you are done.
  • From a USB stick: a live USB. Write an Ubuntu installer image to a USB stick and boot from it, then choose Try Ubuntu. Nothing is installed unless you choose Install later.
  • In a browser: a cloud shell. Several cloud providers offer a free Linux shell in the browser. It is a real Linux system, with a time limit, and it is enough for the commands in this post.

Whichever route you take, the goal is the same: a window with a command prompt where you can type commands and press Enter.

Meet the terminal and the shell

The terminal is the window. The shell is the program running inside it that reads your commands and runs them. On most distributions the default shell is Bash, which is why the code blocks in this post use bash.

When the terminal opens you will see a prompt, something like this:

sanyam@ubuntu:~$

That line tells you your username, the computer name, and your current folder. The ~ means your home folder, the place your files live. The $ means you are a regular user. If you ever see # instead, you are running as the administrator, called root, and you should be extra careful.

Two ideas make everything else easier:

  • Linux organises files as one tree starting at /, called root. Your home folder is usually /home/yourname, shortened to ~.
  • Almost everything you type is case sensitive. Notes.txt and notes.txt are two different files.

Your first 10 commands

Work through these in order. They build one small practice folder, so you can see each command change something real.

First, find out where you are and what is here.

pwd
ls
ls -la
  1. pwd prints the working directory, the full path of the folder you are in.
  2. ls lists the files and folders in the current folder. ls -la lists all of them, including hidden ones, with details such as size and permissions.

Next, make a practice folder and move into it.

mkdir linux-practice
cd linux-practice
pwd
  1. mkdir makes a directory, or folder.
  2. cd changes directory. cd .. moves up one level, and cd ~ takes you home from anywhere.

Create a file and write in it.

touch notes.txt
echo "My first Linux file" > notes.txt
cat notes.txt
  1. touch creates an empty file, or updates the timestamp if the file already exists.
  2. echo prints text. With > it writes that text into a file instead, replacing what was there. With >> it adds to the end of the file.
  3. cat prints the contents of a file to the screen. For long files, use less notes.txt instead and press q to quit.

Copy the file, rename the copy, then clean up with care.

cp notes.txt backup.txt
mv backup.txt first-notes.txt
ls
rm first-notes.txt
ls
  1. cp copies a file. cp -r folder copy-folder copies a folder and everything in it.
  2. mv moves a file, and it is also how you rename a file: move it to a new name in the same folder.
  3. rm removes a file. This is the one command in this list with no undo and no trash folder. Check the name with ls before you run it, and avoid rm -rf until you fully understand what it deletes.

Finish the practice by going home and removing the practice folder, only after you have checked what is inside it.

cd ~
ls linux-practice
rm linux-practice/notes.txt
rmdir linux-practice

rmdir only removes an empty folder, which makes it a safer first cleanup tool than rm -r.

The 10 commands at a glance

Command What it does
pwd Show the current folder
ls List files and folders
cd Change folder
mkdir Make a new folder
touch Create an empty file
echo Print text, or write it to a file
cat Show the contents of a file
cp Copy a file or folder
mv Move or rename a file
rm Delete a file, with no undo

A first look at permissions

Run ls -l and you will see lines that start like this:

-rw-r--r-- 1 sanyam sanyam 21 Nov  8 12:00 notes.txt

The first block is the permission string. The first character is - for a file or d for a directory. The next nine characters are three groups of read, write and execute permissions, for the owner, the group and everyone else.

You do not need to master permissions in the first hour. Remember two things: if a script will not run, it may need the execute permission, and if a command says Permission denied, do not work around it by running everything as the administrator.

Some commands do need administrator rights, such as installing software. Run just that one command with sudo in front of it, type your password when asked, and read the command before you press Enter.

sudo apt update

Install software with a package manager

Installing software on Linux usually does not mean downloading an installer from a website. You ask the package manager for a program, and it installs the program and everything it needs.

The command depends on your distribution family. To install a small text editor called nano and a tool called htop that shows running processes:

On Debian and Ubuntu:

sudo apt update
sudo apt install nano htop

Run apt update first. It refreshes the list of available software. Without it, installs can fail or give you an older version.

On Fedora, Rocky Linux and AlmaLinux:

sudo dnf install nano htop

On Arch Linux and Manjaro:

sudo pacman -S nano htop

Removing a program uses the same tool, for example sudo apt remove htop on Ubuntu. When a command differs between families, it is usually this one. Almost everything else in this post is identical.

How to get help and get unstuck

You are not expected to memorise flags and options. Linux carries its own manual.

man ls
ls --help
history
  • man opens the manual page for a command. Use the arrow keys to scroll and press q to quit. Try man pwd and you will see every option in one place.
  • --help gives a shorter summary, right in the terminal. If you remember only one habit from this post, make it this one: try the command name with --help before searching the web.
  • history shows the commands you have already run. Press the up arrow to walk back through them, which saves retyping and helps you spot a typo.
  • If a command seems stuck, press Ctrl + C to stop it. If the screen fills with output, clear gives you a clean prompt again.

When a command prints an error, read the last line first. It usually names the problem in plain terms, such as No such file or directory or Permission denied. Check your current folder with pwd, your spelling, and capital letters, in that order. Those three checks fix most beginner errors.

Checklist

  • Open a terminal with WSL, a virtual machine, a live USB or a cloud shell.
  • Read your prompt and confirm you are in your home folder with pwd.
  • Run all 10 commands in the practice folder: pwd, ls, cd, mkdir, touch, echo, cat, cp, mv and rm.
  • Read one manual page with man and one short summary with --help.
  • Update your package list and install one program with apt, dnf or pacman.
  • Stop a running command once with Ctrl + C, on purpose, so you know it works.

If you can do those six things, you have done more than read about Linux. You have used it. The natural next step is to stay in that same practice folder and learn searching next: grep to find text in files, and find to find files by name.

About the author

  • I am an Engineer in love with software and writing code. I am super passionate about the reach of technology, and when it comes to conquering new frontiers, I want to be there in the forefront.