T.01 · Terminal Fundamentals

Getting Started

What is a terminal? What is a shell? How do you read the prompt and ask for help? Start here.

If you have not used a terminal before, the most useful thing you can know is that the terminal is just a window that shows text and accepts typed commands. There is nothing mystical about it. Once you accept that "this is a text app," every command that follows is just words you type, output you read, and decisions about what to do next.

Two words you will hear constantly: terminal and shell. They are not the same thing. The terminal is the window; the shell is the program running inside it that interprets your commands.

Terminal vs shell

Terminal

The app that draws characters on your screen and reads what you type from the keyboard. On Linux: gnome-terminal, konsole, xterm. On macOS: Terminal.app, iTerm2. On Windows: Windows Terminal, ConEmu.

Historically these emulated physical hardware terminals (DEC VT100). Most modern terminals still respect the VT100/xterm escape codes for color and cursor positioning.

Shell

The program that runs inside the terminal and interprets the text you type as commands. The shell parses your input, finds the right program to run, and prints output back. On Linux/macOS the default is usually bash or zsh. On Windows: cmd.exe, PowerShell, or any Unix shell via WSL.

The shell is also a small programming language. Variables, loops, conditionals, functions — shell scripts are the original DevOps glue.

Day to day, you don't have to keep them straight. People say "terminal" when they mean either. But when you read documentation that says "set this in your shell's rc file" or "your terminal emulator must support 256 colors," you'll know which layer is being discussed.

Common shells

ShellFound onNotes
bashMost Linux distros (default), older macOSThe default for two decades. Massive script library. Slightly clunky syntax but universal.
zshDefault on macOS since 2019Bash-compatible with much better autocompletion, prompt themes (oh-my-zsh), and history. The modern default.
fishOptional install everywhereFriendliest interactive shell. Autosuggestions out of the box. Not POSIX-compatible — scripts written for bash won't always work.
shEvery Unix systemThe POSIX-standard shell. Minimal. Often a symlink to bash or dash. Used for portable scripts.
PowerShellDefault on Windows; available on Linux/macOSObject-oriented (passes structured data between commands, not text). Excellent for Windows administration.
cmd.exeLegacy WindowsThe original DOS-style command prompt. Avoid for new work; use PowerShell or WSL instead.

For this course, assume bash unless told otherwise. Every example we write will work in bash. Most will work in zsh and sh too.

Reading the prompt

The shell shows you a "prompt" before each command to indicate it's ready for input. The default prompt looks something like this:

alice@workstation:~/projects/cyberlab$ _

Four pieces of information in one line:

The two prompts you'll see in lab writeups. Whenever you read documentation or course material with a leading $, that means "run this as a normal user." A leading # means "run this as root." Don't type the $ or #! They're indicators, not part of the command.

Your first commands

Four commands that work on every Unix system, and that you'll type a few times before this page is over:

alice@ws:~$ whoami alice alice@ws:~$ hostname workstation alice@ws:~$ pwd /home/alice alice@ws:~$ date Thu Jun 5 14:22:18 EDT 2026

How to get help

Two patterns cover 95% of "what does this command do?" questions:

$ ls --help # brief usage summary printed to the terminal $ man ls # full manual page (press q to quit, / to search)

--help is fast and works for almost every command. man is the full manual — sometimes more than you wanted, but always authoritative. Inside man, the keystrokes are simple: j/k or arrow keys to scroll, / to search, n for next match, q to quit.

A third option worth knowing:

$ tldr tar # "Too Long; Didn't Read" — concise examples instead of the full man page

tldr isn't installed by default but is one apt install tldr away. It gives you the three or four most common usages of a command instead of every flag. Often more useful than the full manual for getting started.

Keyboard shortcuts that matter

The point

The terminal is a text window. The shell is the program inside it. Most of what feels intimidating about the terminal is just unfamiliarity with a handful of conventions — the prompt, the keyboard shortcuts, where to find help.

Get comfortable with Tab completion, man/--help, and the four "where am I" commands above. Everything else in this section — navigation, recording, multiplexing — builds on that base.

References

Formatted in APA 7. Alphabetized by first author's last name.

  1. GNU Project. (n.d.). Bash reference manual. Free Software Foundation. https://www.gnu.org/software/bash/manual/
  2. IEEE & The Open Group. (2018). The Open Group Base Specifications Issue 7, 2018 edition (POSIX.1-2017). https://pubs.opengroup.org/onlinepubs/9699919799/
  3. Newham, C. (2005). Learning the bash shell: Unix shell programming (3rd ed.). O'Reilly Media.
  4. tldr-pages contributors. (n.d.). tldr-pages: Simplified and community-driven man pages. https://tldr.sh/