Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Opening a Terminal: Every Way to Get a Command Prompt

A terminal is just one program among many, and there are a dozen ways to open it depending on your system — this page collects them all, from “press a key” to “SSH into a remote server”.


Why Learn This?

Everything else in this book assumes you can reach a shell prompt. That seems trivial on your own laptop — but it stops being trivial the moment you are on a server with no desktop, inside a container, on Windows via WSL, or on a machine where the keyboard shortcut was disabled.

Know three routes: the local shortcut, the application menu, and SSH. Between them they cover every situation you will ever meet.


1. On Linux Desktops

Keyboard shortcuts (fastest)

ShortcutOpens
Ctrl + Alt + TThe default terminal (Ubuntu, Fedora, most GNOME/KDE setups)
Right-click in a folder → Open Terminal HereTerminal at that folder (enable the file-manager setting)
Ctrl + Shift + TNew tab inside an already-open terminal

From the application menu

Press the Super (Windows) key, type “terminal”, and hit Enter — this works on every major desktop environment even if the shortcut was remapped.

The TTY fallback (no graphical desktop)

If the system boots without a GUI — a server install, or a crashed desktop — press:

  • Ctrl + Alt + F2 … F6 to switch to a virtual console
  • Ctrl + Alt + F1 (or F7) to return to the graphical desktop

Log in with your username and password, and you have a plain shell with no graphics at all.


2. On macOS

MethodHow
SpotlightCmd + Space, type terminal, Enter
LaunchpadOther → Terminal
FinderApplications → Utilities → Terminal
Finder shortcutRight-click a folder → Services → “New Terminal at Folder” (enable in Keyboard settings)

macOS opens zsh by default since Catalina, but bash remains installed.


3. On Windows

MethodHow
WSLInstall once with wsl --install, then open “Ubuntu” from the Start menu
Windows TerminalStart menu → “Terminal”; hosts PowerShell, CMD, and WSL shells in tabs
PowerShellStart menu → type “powershell”
Git BashInstalled with Git for Windows; a minimal bash environment

For a real Linux experience on Windows, WSL is the recommended route — see What Is Linux? for why a Linux kernel matters here.


4. On Remote Servers: SSH

Servers usually have no monitor or keyboard. You reach their shell over the network with SSH:

ssh username@server-ip
username@server-ip's password:
Welcome to Ubuntu 24.04.1 LTS ...
username@server:~$

Example — connect with a key instead of a password:

ssh -i ~/.ssh/mykey.pem username@server-ip

Once inside, every command runs on the remote machine — see Terminal vs Shell vs Kernel for how that split works.


5. Special Environments

Containers

A running container has no terminal of its own; attach one with:

docker exec -it <container> bash

Virtual machines

Any VM console window (VirtualBox, QEMU, cloud provider web console) is a terminal — cloud instances often offer a browser-based console for exactly this reason.

Recovery and single-user mode

When a system will not boot normally, the bootloader menu usually offers a recovery mode that drops you into a root shell without a full login.


Common Pitfalls

  • Ctrl + Alt + T conflicts — some apps (and some non-US keyboard layouts) capture it; the menu search always works as a fallback.
  • Closing the terminal kills its shell — but background jobs may survive; that is what nohup and tmux are for (covered in a later process section).
  • SSH from a laptop vs a server — the terminal you type in is always local; only the shell and commands are remote.
  • Windows PowerShell ≠ Linux bash — learn WSL for this book’s commands; PowerShell syntax differs.
  • Typing passwords blindly — Linux does not show * or dots as you type a password; type it and press Enter anyway.

PageWhy it is related
Terminal vs Shell vs KernelWhat is actually running once the window opens
Keyboard ShortcutsShortcuts that work inside the terminal
What Is Linux?Why WSL and containers matter

Opening a Terminal Cheatsheet

SituationMethod
Linux desktopCtrl + Alt + T
Linux desktop, shortcut brokenSuper key → type “terminal”
No GUI / broken desktopCtrl + Alt + F2, log in
macOSCmd + Space → “terminal”
WindowsWSL (“Ubuntu” from Start menu)
Remote serverssh user@host
Inside a containerdocker exec -it <name> bash
New tab / new windowCtrl + Shift + T / Ctrl + Shift + N