Linux and Shell Tutorial
Welcome to the Linux and Shell (Bash) tutorial! This tutorial is designed for beginners, starting from scratch and progressively introducing the Linux operating system and Shell programming.
Tutorial Table of Contents
Part 1: Getting Started
- Linux Introduction - History, features, and distributions of Linux
- Installing Linux - Virtual machine, dual-boot, and WSL installation guides
- Desktop Environment - GNOME, KDE, Xfce, and other desktop environments
- Terminal Basics - Terminal, command line, and basic commands
Part 2: File System
- File System Structure - Linux directory structure and file types
- File Operations - Creating, copying, moving, and deleting files
- File Permissions - Permissions, ownership, and special permissions
- File Search - find, locate, grep, and other search tools
Part 3: Shell Basics
- Shell Introduction - Shell types, configuration files, and prompts
- Input/Output Redirection - Redirection, pipes, and file descriptors
- Pipes and Filters - Pipes, grep, sort, awk, and other tools
Part 4: Text Processing
- Text Editors - Vim and Nano editors
- Text Processing Tools - sed and awk text processing
- Regular Expressions - Regular expressions basics and applications
Part 5: System Administration
- User Management - Users, groups, passwords, and sudo
- Process Management - Process viewing, control, and monitoring
- Package Management - APT, DNF, and Pacman package management
- Service Management - systemd service management
Part 6: Networking
- Network Basics - Network configuration, diagnostic tools, and firewall
- SSH Remote Connection - SSH connection, key authentication, and port forwarding
Part 7: Shell Scripting
- Shell Scripting Basics - Variables, operations, conditions, loops, and functions
- Environment Variables - Environment variable configuration and usage
Part 8: Practical Examples
- Practical Examples - System administration, backup, and monitoring scripts
Learning Tips
Step-by-Step
- Week 1: Complete the Getting Started section to become familiar with basic operations
- Week 2: Learn about the file system and Shell basics
- Week 3: Master text processing and system administration
- Week 4: Learn about networking and Shell scripting
- Continuous Practice: Apply what you've learned in your daily work
Practice-Oriented
- Learn while practicing, don't just read without doing
- Experiment boldly in a virtual machine
- Try to solve problems yourself first
- Make good use of
manmanuals and search engines
Recommended Tools
- Virtual Machine: VirtualBox, VMware
- Terminal Emulator: GNOME Terminal, Terminator, kitty
- SSH Client: OpenSSH, PuTTY (Windows)
- Code Editor: VS Code, Vim
Quick Reference
Common Commands Cheat Sheet
| Category | Commands |
|---|---|
| File Operations | ls, cd, cp, mv, rm, mkdir |
| Text Viewing | cat, less, head, tail, grep |
| Text Processing | sed, awk, cut, sort, uniq |
| System Information | uname, hostname, uptime, df, free |
| Process Management | ps, top, kill, jobs, bg, fg |
| User Management | useradd, passwd, su, sudo |
| Network Tools | ip, ping, ss, curl, wget |
| Compression/Extraction | tar, gzip, zip, unzip |
Shortcut Cheat Sheet
| Shortcut | Function |
|---|---|
Ctrl+C | Interrupt command |
Ctrl+Z | Pause command |
Ctrl+D | Exit terminal |
Ctrl+L | Clear screen |
Ctrl+R | Search history |
Tab | Auto-complete |
Ctrl+A | Move to beginning of line |
Ctrl+E | Move to end of line |
Getting Help
- man manuals:
man command - --help option:
command --help - info pages:
info command - Online resources: Stack Overflow, Linux community
Copyright
This tutorial is for learning purposes only. Feel free to share and distribute.
Start learning: Linux Introduction