Skip to content

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

  1. Linux Introduction - History, features, and distributions of Linux
  2. Installing Linux - Virtual machine, dual-boot, and WSL installation guides
  3. Desktop Environment - GNOME, KDE, Xfce, and other desktop environments
  4. Terminal Basics - Terminal, command line, and basic commands

Part 2: File System

  1. File System Structure - Linux directory structure and file types
  2. File Operations - Creating, copying, moving, and deleting files
  3. File Permissions - Permissions, ownership, and special permissions
  4. File Search - find, locate, grep, and other search tools

Part 3: Shell Basics

  1. Shell Introduction - Shell types, configuration files, and prompts
  2. Input/Output Redirection - Redirection, pipes, and file descriptors
  3. Pipes and Filters - Pipes, grep, sort, awk, and other tools

Part 4: Text Processing

  1. Text Editors - Vim and Nano editors
  2. Text Processing Tools - sed and awk text processing
  3. Regular Expressions - Regular expressions basics and applications

Part 5: System Administration

  1. User Management - Users, groups, passwords, and sudo
  2. Process Management - Process viewing, control, and monitoring
  3. Package Management - APT, DNF, and Pacman package management
  4. Service Management - systemd service management

Part 6: Networking

  1. Network Basics - Network configuration, diagnostic tools, and firewall
  2. SSH Remote Connection - SSH connection, key authentication, and port forwarding

Part 7: Shell Scripting

  1. Shell Scripting Basics - Variables, operations, conditions, loops, and functions
  2. Environment Variables - Environment variable configuration and usage

Part 8: Practical Examples

  1. Practical Examples - System administration, backup, and monitoring scripts

Learning Tips

Step-by-Step

  1. Week 1: Complete the Getting Started section to become familiar with basic operations
  2. Week 2: Learn about the file system and Shell basics
  3. Week 3: Master text processing and system administration
  4. Week 4: Learn about networking and Shell scripting
  5. 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 man manuals and search engines
  • 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

CategoryCommands
File Operationsls, cd, cp, mv, rm, mkdir
Text Viewingcat, less, head, tail, grep
Text Processingsed, awk, cut, sort, uniq
System Informationuname, hostname, uptime, df, free
Process Managementps, top, kill, jobs, bg, fg
User Managementuseradd, passwd, su, sudo
Network Toolsip, ping, ss, curl, wget
Compression/Extractiontar, gzip, zip, unzip

Shortcut Cheat Sheet

ShortcutFunction
Ctrl+CInterrupt command
Ctrl+ZPause command
Ctrl+DExit terminal
Ctrl+LClear screen
Ctrl+RSearch history
TabAuto-complete
Ctrl+AMove to beginning of line
Ctrl+EMove to end of line

Getting Help

  • man manuals: man command
  • --help option: command --help
  • info pages: info command
  • Online resources: Stack Overflow, Linux community

This tutorial is for learning purposes only. Feel free to share and distribute.


Start learning: Linux Introduction

Content is for learning and research only.