Switching to Linux for the first time can feel intimidating once you leave the graphical interface behind and open a terminal. However, the terminal is actually where Linux becomes powerful — a handful of commands let you do in seconds what would take several clicks through menus. This guide covers the commands you’ll use constantly, organized by what you’re trying to accomplish.
Why Learn the Command Line?
Many Linux distributions come with a perfectly usable graphical desktop, so you might wonder why bother with the terminal at all. A few reasons make it worth learning:
- Speed: once you know the commands, most tasks are faster to type than to click through.
- Remote access: when you manage a server (like the Raspberry Pi home server covered in our other guide), you’ll almost always connect over SSH, which is terminal-only.
- Automation: commands can be combined into scripts that run tasks automatically, something a graphical interface can’t easily replicate.
- Consistency: the same commands work across almost every Linux distribution, while graphical tools vary widely.
Navigating the File System
pwd— prints your current directory (“print working directory”), so you always know where you are.

ls— lists the files and folders in the current directory. Add-lfor a detailed list (ls -l), or-ato include hidden files (ls -a).

cd— changes directory. For example,cd Documentsmoves into a folder called Documents, andcd ..moves up one level.


mkdir— creates a new folder. For example,mkdir projectscreates a folder named “projects”.
Working with Files
cp— copies a file. For example,cp file.txt backup.txtcreates a copy named backup.txt.mv— moves or renames a file. For example,mv file.txt documents/moves file.txt into the documents folder, whilemv oldname.txt newname.txtrenames it.rm— deletes a file. Use this one carefully — there’s no recycle bin by default, so a deleted file is usually gone for good. Add-rto delete a folder and everything inside it (rm -r foldername).cat— displays the contents of a file directly in the terminal. Useful for quickly checking short files like configuration files.nano— opens a simple, beginner-friendly text editor directly in the terminal. Runnano filename.txtto edit a file, and use Ctrl+O to save and Ctrl+X to exit.
Managing Permissions
Linux tracks who can read, write, or execute each file, which is one of the operating system’s core security features.
chmod— changes a file’s permissions. For example,chmod +x script.shmakes a script executable.chown— changes who owns a file. For example,sudo chown user:user file.txtassigns the file to a specific user and group.sudo— runs a command with administrator privileges. You’ll see this prefix constantly, especially when installing software or editing system files.
Managing Software
The exact command depends on your distribution’s package manager:
- On Debian-based systems (Ubuntu, Raspberry Pi OS):
sudo apt updaterefreshes the list of available packages, andsudo apt install packagenameinstalls new software. - On Fedora-based systems:
sudo dnf install packagename. - On Arch-based systems:
sudo pacman -S packagename.
Checking System Information
top(or the more modernhtop, if installed) — shows running processes and how much CPU and memory they’re using, updated in real time.df -h— shows how much disk space is used and available across your drives, in a human-readable format.free -h— shows how much RAM is being used and how much is free.uname -a— prints information about the system, including the kernel version.
Networking Basics
ping— checks whether you can reach another device or server. For example,ping google.comtests your internet connection.ip a— shows your network interfaces and their IP addresses (on older systems,ifconfigdoes something similar).ssh— connects to another machine remotely. For example,ssh user@192.168.1.10opens a remote session, exactly as covered in our guide to turning a Raspberry Pi into a home server.
A Few Habits Worth Building Early
- Use the Up arrow to cycle through previously run commands instead of retyping them.
- Press Tab while typing a command or filename to auto-complete it — this saves time and helps avoid typos.
- When unsure what a command does, run
man commandname(for example,man ls) to open its manual page directly in the terminal.
Not sure which permission numbers to use? Our free chmod calculator converts values like 755 into rwxr-xr-x and gives you the exact command to copy.
Want the exact command for a task? Our free Linux command generator builds commands like find, grep and tar for you, with every option explained.
Final Thoughts
You don’t need to memorize every command right away — most Linux users build up this knowledge gradually, looking things up as they go. Start with navigation and file management, since you’ll use those constantly, and layer in the rest as you need them. Once these commands feel natural, the terminal stops being intimidating and becomes one of the most efficient tools in your workflow.
Keep reading: once these commands feel natural, automate them with cron jobs and keep your scripts safe with Git.
1 thought on “Essential Linux Commands Every Beginner Should Know”