Terminal vs shell
A terminal is the interface window or device that displays text and accepts keyboard input. A shell is the program running inside it that interprets commands. Bash and Zsh are shells; GNOME Terminal, Konsole, iTerm2, and the Linux console are terminal interfaces.
This distinction matters because terminal settings and shell behavior are configured in different places.
Bash and Zsh
Bash is the traditional default shell on many Linux systems and the safest assumption for scripts. Zsh is popular for interactive use because of its completion and customization features.
A command that works interactively in Zsh may not be portable to a Bash script. For learning Linux fundamentals, Bash is the common baseline.
Prompt anatomy and command structure
A prompt usually shows context such as username, hostname, current directory, Git branch, or privilege indicator. The prompt is not part of the command; it is a cue from the shell.
Most commands follow a shape: command name, options, arguments, and redirections. Options modify behavior. Arguments tell the command what to act on.
grep -n "error" /var/log/app.log > errors.txt
# grep = command, -n = option, pattern and file = arguments, > = redirectionQuoting
Quoting controls how the shell treats spaces, variables, and special characters. Single quotes preserve text almost literally. Double quotes allow variable expansion while keeping spaces together.
Many beginner bugs come from unquoted variables or paths with spaces. When in doubt, quote variables as "$name".
Pipes and redirection
A pipe sends the output of one command to the input of another. Redirection sends output to files or reads input from files. These ideas make Unix-style tools composable.
journalctl -u nginx --since today | grep -i error | lessecho "hello" > message.txt
cat message.txtEnvironment variables and PATH
Environment variables are key-value strings inherited by child processes. PATH is an environment variable listing directories the shell searches for commands.
If a command is installed but not found, it may not be in PATH, or your current shell has not loaded the updated environment.
echo "$PATH"
which python3Aliases and shell startup behavior
Aliases are interactive shortcuts. They are convenient but should not be relied on in scripts. Shell startup files such as ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.zshrc, and /etc/profile are loaded in different situations.
Login shells, interactive shells, and non-interactive script shells can read different files. If a setting appears in one terminal but not another, startup file order is a likely cause.
Practical examples
alias ll='ls -lah'export EDITOR=nanohistory 20