Linux Terminal and Shell

Two words people mix up: the terminal is the window (the text interface), and the shell (usually Bash) is the *program* inside it that reads and runs your commands.

Your first commands

bash
$ whoami        # your username
$ pwd           # print working directory (where you are)
$ echo "hello"  # print text
$ date          # current date/time
Note: The $ is the prompt β€” you don't type it; it's the shell waiting for input. (A # prompt means you're root.)

Command structure

Almost every command follows the same shape: a name, optional options (flags), and optional arguments.

bash
ls   -l    /home
#  name option argument
# "list, in long format, the /home directory"
PartExampleIs
namelsthe command
option-l, --allmodifies behavior (short or long form)
argument/homewhat it acts on

Getting help

bash
man ls          # full manual (q to quit)
ls --help       # quick usage summary
type cd         # what is this command?

Time-savers

  • Tab β€” autocomplete commands and file paths (press twice to list options).
  • ↑ / ↓ β€” cycle through command history; Ctrl+R β€” search it.
  • Ctrl+C β€” cancel the running command; Ctrl+L β€” clear the screen.
Tip: Lean on Tab completion constantly β€” it's faster and prevents typos in long paths. And when you don't know a command's options, --help gives a quick reminder while man gives the full reference. These two habits alone make the terminal far less intimidating.
Free preview. Sign in and subscribe to unlock all 809 lessons across 25 courses.
Linux Terminal and Shell β€” Linux & Shell | Full Stack Learning Simplified