DevOps & Linux Administration
Linux Terminal & File System
Module II: Linux Terminal & File System. This module introduces the Linux command-line interface, terminal usage, Linux file system hierarchy, navigation commands, and essential concepts related to files and directories. These concepts form the foundation of Linux system administration and DevOps workflows.
What is the Linux Terminal?
The Linux terminal is a text-based interface through which users interact with the operating system using commands. Unlike graphical interfaces, the terminal provides faster and more powerful control over the system.
Most DevOps engineers, cloud administrators, and cybersecurity professionals heavily rely on terminal commands for automation, server management, and deployment tasks.
Terminal Workflow
What is a Shell?
A shell is a command interpreter that acts as a bridge between the user and the Linux kernel. It reads commands entered by the user and passes them to the operating system for execution.
- Bash – Most common Linux shell
- Zsh – Advanced shell with customization
- Fish – User-friendly interactive shell
- Sh – Traditional Unix shell
| Shell | Main Feature |
|---|---|
| Bash | Default shell in many Linux distributions |
| Zsh | Highly customizable and modern |
| Fish | Beginner-friendly with smart suggestions |
Linux File System Structure
Linux organizes all files and directories in a hierarchical structure starting from the root directory represented by /.
Everything in Linux is treated as a file, including devices and system resources.
Linux Directory Hierarchy
| Directory | Purpose |
|---|---|
| /home | Stores user files and personal data |
| /bin | Essential system commands and binaries |
| /etc | Configuration files |
| /var | Variable data like logs and caches |
| /tmp | Temporary files |
Basic Navigation Commands
Linux provides commands to move between directories and manage files efficiently.
| Command | Purpose |
|---|---|
| pwd | Shows current directory |
| ls | Lists files and folders |
| cd | Changes directory |
| mkdir | Creates new directory |
| touch | Creates empty file |
Example Terminal Session
$ pwd /home/student $ mkdir project $ cd project $ touch notes.txt $ ls notes.txt
Absolute Path vs Relative Path
Linux uses paths to locate files and directories.
Absolute Path
Starts from the root directory /.
Relative Path
Defined relative to the current working directory.
Types of Files in Linux
Linux supports different types of files for different purposes.
- Regular Files – text files, images, programs
- Directories – folders containing files
- Symbolic Links – shortcuts to files
- Device Files – hardware representations
Summary
In this chapter, we learned how the Linux terminal works, explored different shells, understood the Linux file system hierarchy, and studied important navigation commands used in everyday Linux administration and DevOps workflows.