What the command line is
The command line is a window where you type an instruction, press Enter, and the computer answers in text. There are no buttons or menus. You’ll also hear it called the terminal (the window), the shell (the program that reads what you type) or bash (the most common shell on Linux). For a beginner they all mean the same thing.
It looks old-fashioned, but it has lasted because it’s exact. A guide can tell you precisely what to type, you can copy it, and it does the same thing on every machine. That’s why so many server guides are written with it.
You don’t need it to start
Most of this site works without typing a single command. ZimaOS and CasaOS install apps from an app store with one click. Tailscale, Uptime Kuma, Nginx Proxy Manager, Jellyfin and Immich are all run from web pages once they’re installed. Routers, backups and password managers are settings screens and buttons. Wherever a page here has a no-terminal route, it comes first.
The command line becomes worth learning when you want to follow guides written for plain Ubuntu or Debian, fix something a web page can’t reach, or understand what your server is doing underneath. There’s no deadline. Plenty of people run a homelab for years knowing a handful of commands.
How a command is put together
Every command follows the same pattern: what to do, then what to do it to.
| Part | Example | What it means |
|---|---|---|
| Run as administrator | sudo |
Run the rest of the line with full permissions. It asks for your password |
| The program | apt |
The installer on Ubuntu and Debian |
| What to do | install |
One of the jobs apt can do |
| What to do it to | htop |
The name of the app to install |
Put together, sudo apt install htop means “as the administrator, use the installer to install htop”. Extra options that change how a command behaves start with a dash, such as the -h in df -h, which asks for sizes in gigabytes and megabytes rather than long strings of numbers.
What it needs
- A computer you already have. Macs come with an app called Terminal. Windows has PowerShell, and Windows 11 also has Terminal. Either can run ssh, the command that logs you in to a server from another computer.
- Somewhere safe to practise. Your server is fine while it has nothing important on it. On Windows, WSL (Windows Subsystem for Linux) gives you Ubuntu in a window. A Raspberry Pi or an old laptop works too.
- Fifteen minutes at a time. Short, regular practice sticks better than one long evening.
How LinuxCommand.org fits in
The pick is William Shotts’s free site, written for the moment you first face a blinking cursor:
- Learning the Shell starts with what the shell is, then how to move between folders, look at files, and take a guided tour of where things live on a Linux system.
- Files and commands. Copying, moving and deleting, and finding out what any command does.
- Permissions, the reason behind most “permission denied” errors you’ll meet.
- Writing Shell Scripts, for when you want to save a list of commands and run it again with one word.
- The free book. The Linux Command Line covers the same ground in far more detail, close to 600 pages, as a free PDF under a Creative Commons licence.
- Adventures, a free follow-on book about more tools, for later.
The easy way to start
- Open a terminal on the computer you already have. On a Mac, open Terminal from Applications, then Utilities. On Windows 11, right-click the Start button and choose Terminal. On Windows 10, choose PowerShell from the same menu.
- Connect to your server, if you have one, by typing ssh, your user name, @, and the server’s address, such as
ssh [email protected]. The first time, type yes when it asks whether to trust the server, then enter your password. - Or practise on Windows itself. Right-click PowerShell, choose Run as administrator, paste this one line, and restart when it finishes. It installs Ubuntu in a window of its own.
wsl --install
- Try three harmless commands.
pwdshows where you are,lsshows what’s there, andcdfollowed by a folder name moves you into it. None of them can change anything. - Work through LinuxCommand.org’s first lessons, typing every example rather than reading it.
- Read any command before you run it. When a guide gives you one, paste it into explainshell, in the list below, to see what each part does.
Questions people ask
Can I break the computer?
Most of the commands you’ll start with only show you things. The ones that change the system need sudo, which is why it asks for your password first, so treat that as a moment to check what you typed. The one to respect without sudo is rm, which deletes your own files with no recycle bin. On a practice machine, the worst that can happen is reinstalling it.
Why can’t I see my password as I type it?
Some password prompts, including the one ssh shows when you log in, display nothing at all while you type. That’s deliberate, so nobody looking over your shoulder learns how long it is. Type it and press Enter. From Ubuntu 26.04, the sudo prompt shows a star for each character instead.
How do I copy and paste?
On a Mac, Cmd+C and Cmd+V work as normal. In Windows Terminal, Ctrl+C copies when text is selected and Ctrl+V pastes. In most Linux terminal windows, use Ctrl+Shift+C and Ctrl+Shift+V, because Ctrl+C on its own does something else there.
How do I stop something that’s running?
Press Ctrl+C. It stops most commands straight away. To leave a full-screen program such as htop or a manual page, press q.
Is there anything between the terminal and an app store?
Yes. Cockpit adds a web page to a Linux server where you can install updates, read logs and restart services with buttons, and it has a terminal in the browser for when you want one. Installing it takes one command, and from then on you can do a lot of the day-to-day work with a mouse.
