Essential Linux Commands Every Beginner Should Know

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.
  • pwd — prints your current directory (“print working directory”), so you always know where you are.
Command pwd
  • ls — lists the files and folders in the current directory. Add -l for a detailed list (ls -l), or -a to include hidden files (ls -a).
Command ls
  • cd — changes directory. For example, cd Documents moves into a folder called Documents, and cd .. moves up one level.
Command cd
Command cd..
  • mkdir — creates a new folder. For example, mkdir projects creates a folder named “projects”.

Working with Files

  • cp — copies a file. For example, cp file.txt backup.txt creates a copy named backup.txt.
  • mv — moves or renames a file. For example, mv file.txt documents/ moves file.txt into the documents folder, while mv oldname.txt newname.txt renames 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 -r to 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. Run nano filename.txt to 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.sh makes a script executable.
  • chown — changes who owns a file. For example, sudo chown user:user file.txt assigns 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 update refreshes the list of available packages, and sudo apt install packagename installs 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 modern htop, 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.com tests your internet connection.
  • ip a — shows your network interfaces and their IP addresses (on older systems, ifconfig does something similar).
  • ssh — connects to another machine remotely. For example, ssh user@192.168.1.10 opens 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”

Leave a Comment