Getting a shell

Key takeaways The shell lives inside a terminal — a window that shows a prompt and waits for commands. On Linux and macOS the Terminal app is already installed; open it and you are ready. On Windows, the best option is WSL (Windows Subsystem for Linux), a real Linux running alongside Windows. To work on a server or a Raspberry Pi you connect over the network with SSH. And you can practise safely in a virtual machine, a container, or a cloud shell.

The previous lesson explained what a shell is. This one is purely practical: how to open one on whatever computer you happen to have in front of you. Every machine below reaches the same kind of Unix shell — only the way you open the window differs.

On Linux

You already have everything you need. Open your applications menu and look for the app called Terminal (some desktops call it “Console” or “Terminal Emulator”). Launch it and you will see a prompt — a short line of text ending in $ waiting for you to type. That is the shell. You are ready; skip ahead to the next lesson whenever you like.

On macOS

macOS also ships with a Terminal app — find it in Applications → Utilities, or press Cmd + Space and type “Terminal”. It opens a shell called zsh, which behaves almost exactly like the Linux shell this path teaches.

macOS is Unix-like under the hood, so nearly everything in this path works there unchanged — the same commands, the same navigation, the same ideas. The one wrinkle to know about: macOS inherits its command-line tools from BSD, while most Linux systems use the GNU versions. A few commands take slightly different flags as a result (for example, some options to ls or sed differ). It rarely matters for the basics, and we will flag it when it does.

On Windows

Native Windows shells — PowerShell and CMD — are genuinely useful, but they are different shells with different commands. This path targets a Unix shell, so on Windows you want a way to run one of those instead.

The best option by far is WSL (Windows Subsystem for Linux). WSL installs a real Linux distribution that runs alongside Windows — no dual-boot, no wiping anything. You open it like any other app and get a genuine Linux shell, the same one a Linux user sees. In a recent Windows, you can usually install it by opening PowerShell and running a single command to enable WSL, then launching the Linux distribution it installs.

If WSL is not an option for you, two alternatives give you a Unix-style shell:

  • Git Bash — a lightweight shell that comes with Git for Windows. Good enough for learning the basics, though it is not a full Linux.
  • A virtual machine — software like VirtualBox runs a complete Linux inside a window on your Windows desktop. Heavier to set up, but a full, isolated system.

For following this path, WSL first, Git Bash or a VM as fallbacks.

On a server or a Raspberry Pi

Small computers like a Raspberry Pi or a rented server often have no screen or keyboard of their own. You reach them over the network with SSH — a tool that opens a shell on the remote machine from the terminal on your own computer. You type locally; the commands run over there.

A Raspberry Pi is not a toy in this respect: it runs Raspberry Pi OS, a full Linux, so the shell on a Pi is the same shell you have been learning. (If the idea of a whole computer on one small board is new, see what is an SBC.) SSH itself is a later lesson in this path — for now, just know that “getting a shell” on a remote box means connecting to it with SSH rather than opening a local app.

Practicing safely

If you are nervous about typing commands into the computer you rely on every day, give yourself a sandbox. Any of these lets you experiment freely and, if something goes wrong, throw it away and start fresh:

  • A virtual machine — a whole Linux running in a window, isolated from your real system.
  • A container — a lightweight, disposable Linux environment you can reset in seconds.
  • A spare Raspberry Pi — cheap, real hardware you can reflash if you break it.
  • A cloud shell — a free Linux shell in your browser, hosted by a cloud provider; nothing to install at all.

That said, the beginner commands ahead only look around, read, and move between folders. Follow along as written and they will not harm your machine — the sandbox is for peace of mind and for the day you start experimenting on your own.

Quick check: on Windows, the best way to get a real Linux shell for this path is…

Recap

  • The shell lives inside a terminal window that shows a prompt.
  • Linux and macOS already have a Terminal app — open it and you are ready.
  • macOS runs zsh and is Unix-like; watch for the odd BSD-vs-GNU flag difference.
  • On Windows, install WSL for a real Linux shell (Git Bash or a VM as fallbacks).
  • Reach a server or Raspberry Pi over the network with SSH.
  • Practise safely in a VM, container, spare Pi, or cloud shell — the basics won’t hurt your machine either way.

Next up: your first commands