๐ Shell 101: Getting Started
Understanding how to launch and interact with a shell is fundamental. This section introduces core concepts such as launching the shell, interpreting prompts, and basic interaction.
๐ Launching the Shell
Depending on your system, there are several ways to open a shell:
Graphical Desktops
- Click the terminal icon in your dock/taskbar.
- Search for โTerminalโ in applications menu.
Command Line Access
On servers or headless machines:
1 | |
Remote Access
Use SSH to connect remotely:
1 | |
Once launched, youโll see a prompt indicating readiness to accept commands.
๐ฅ Understanding the Prompt
A typical prompt looks like this:
1 | |
Breaking it down:
- user: Current logged-in user
- host: Machine name
- ~/dir: Current working directory (~ means home)
- $: Standard user prompt (# indicates root)
Customize your prompt via PS1 variable in .bashrc or .zshrc.
โจ๏ธ Basic Interaction
Type any valid command followed by Enter:
1 2 | |
If the command exists, its output appears. Otherwise:
1 2 | |
Commands can take arguments and flags:
1 2 | |
๐งญ Navigation Basics
| Command | Description |
|---|---|
pwd |
Print Working Directory |
cd |
Change Directory |
ls |
List contents |
clear |
Clear screen |
Examples:
1 2 3 | |
๐งพ Summary of Key Concepts
- A shell is a command-line interpreter.
- You can run it locally or over SSH.
- Prompt tells you where you are and what privileges you have.
- Commands have names, options (flags), and arguments.
- Navigation uses standard Unix paths and conventions.
๐ Continue to: Commands and Exit Codes