First Login and Terminal¶
Learn how to log in to a Linux system, navigate the terminal, and execute your first Linux commands. The terminal is the primary interface used by Linux administrators, Cloud Engineers, DevOps Engineers, and Platform Engineers.
Learning Path¶
Course Progress
What You'll Learn¶
After completing this lesson, you'll be able to:
- Log in to a Linux system
- Understand the Linux terminal
- Differentiate Terminal, Shell, and Console
- Execute basic Linux commands
- Understand the Linux command prompt
- Navigate directories
- Exit the terminal safely
Prerequisites¶
Before starting this lesson, you should complete:
- Linux Installation (VirtualBox, VMware & WSL)
- Linux Boot Process
Why Learn the Linux Terminal?¶
One of the biggest surprises for beginners is that Linux professionals spend most of their time in the terminal.
While Linux Desktop provides a graphical interface, production Linux servers usually do not.
Cloud servers, Kubernetes nodes, Docker hosts, CI/CD runners, and enterprise Linux systems are managed almost entirely through the command line.
Learning the terminal is one of the most valuable Linux skills.
What is a Terminal?¶
A Terminal is an application that allows you to interact with the operating system by typing commands.
Instead of clicking icons, you type commands and receive immediate output.
The terminal acts as the communication bridge between you and Linux.
Terminal vs Shell vs Console¶
Many beginners use these terms interchangeably, but they have different meanings.
| Component | Description |
|---|---|
| Terminal | Application used to enter commands |
| Shell | Program that interprets commands |
| Console | Physical or virtual interface connected to the system |
Example:
The terminal displays the interface, while the shell processes your commands.
Logging into Linux¶
After starting your Linux machine, you'll see a login prompt.
Desktop:
Server:
Enter:
- Username
- Password
After successful authentication, Linux displays the command prompt.
Understanding the Command Prompt¶
Example:
Let's break it down.
| Part | Meaning |
|---|---|
| basha | Logged-in user |
| rebash | Computer hostname |
| ~ | Home directory |
| $ | Normal user |
If you log in as the root user, the prompt changes to:
Notice the # symbol.
Your First Linux Commands¶
Let's execute a few simple commands.
Display Current User¶
Example output:
Display Current Directory¶
Example:
List Files¶
Detailed listing:
Display Date¶
Display Calendar¶
Display System Information¶
Display Linux Distribution¶
Running Multiple Commands¶
Commands can be executed one after another.
Example:
Or on a single line:
Each command runs only if the previous one succeeds.
Understanding Command Syntax¶
Most Linux commands follow this structure:
Example:
Breakdown:
| Part | Meaning |
|---|---|
| ls | Command |
| -la | Options |
| /home | Argument |
Getting Help¶
Linux includes built-in documentation.
Display command help:
Manual pages:
Search manual pages:
Learning to use the manual pages is an essential Linux skill.
Clearing the Terminal¶
To clear the screen:
Keyboard shortcut:
Command History¶
Linux remembers previously executed commands.
View history:
Navigate using:
- ↑ Up Arrow
- ↓ Down Arrow
Search history:
This saves time and improves productivity.
Keyboard Shortcuts¶
| Shortcut | Purpose |
|---|---|
| Ctrl + C | Stop running command |
| Ctrl + D | Logout |
| Ctrl + L | Clear terminal |
| Ctrl + R | Search history |
| Tab | Auto-complete |
| ↑ | Previous command |
| ↓ | Next command |
Learning these shortcuts makes terminal usage much faster.
Production Perspective¶
Cloud engineers rarely use graphical interfaces.
Typical production workflow:
Everything begins with the Linux terminal.
Whether you're managing:
- AWS EC2
- Azure VM
- Google Compute Engine
- Kubernetes Node
you'll use the terminal every day.
Hands-on Lab¶
Run the following commands.
Display current user:
Display hostname:
Display current directory:
List all files:
Display Linux version:
Display kernel version:
Display current date:
Display command history:
Try using the Tab key to auto-complete commands.
Best Practices¶
- Practice using the terminal every day.
- Learn keyboard shortcuts.
- Read command manual pages.
- Avoid memorizing commands—understand what they do.
- Use Tab completion to reduce typing errors.
Common Mistakes¶
❌ Thinking Linux requires a graphical interface.
✅ Most production Linux servers are managed entirely from the terminal.
❌ Memorizing commands without understanding them.
✅ Learn command syntax and options instead.
❌ Logging in as the root user for everyday work.
✅ Use a regular user account and elevate privileges only when necessary.
Interview Questions¶
Beginner¶
- What is a Linux Terminal?
- What is a Shell?
- What is the difference between Terminal and Shell?
- Which command displays the current directory?
- Which command displays the logged-in user?
Intermediate¶
- Explain Linux command syntax.
- How do you access command documentation?
- How does command history improve productivity?
- Why is the terminal preferred in production?
Architect Level¶
- Why do cloud engineers primarily use the terminal?
- How does terminal-based administration improve scalability?
- What are the security advantages of remote terminal administration?
Summary¶
In this lesson, you learned:
- How to log in to Linux
- What the terminal is
- The difference between Terminal, Shell, and Console
- Your first Linux commands
- Command syntax
- Command history
- Essential keyboard shortcuts
The Linux terminal is the primary tool you'll use throughout this course and your professional career.
Key Takeaways¶
- The terminal is the primary interface for Linux administration.
- The shell interprets your commands.
- Most production Linux servers do not have a graphical interface.
- Learning command-line basics is the first step toward becoming a Linux professional.
- Practice is the fastest way to become comfortable with the terminal.
What's Next?¶
Linux Directory Structure (Filesystem Hierarchy Standard - FHS)
In the next lesson, you'll learn:
- Linux filesystem hierarchy
- Root directory (
/) - Home directories
- System directories
- Configuration files
- Temporary storage
- Best practices for navigating the Linux filesystem