| title | Linux DevOps Complete Guide |
|---|---|
| description | Comprehensive Linux system administration and DevOps guide covering commands, storage, networking, security, performance, and automation |
| category | Linux |
| difficulty | beginner |
This is a comprehensive Linux system administration and DevOps guide designed for practitioners at all skill levels - from beginners learning basic commands to experienced engineers optimizing production systems. The content is organized into 10 major sections covering the essential knowledge needed for modern Linux system administration and DevOps practices.
This guide provides complete coverage of:
- Command Mastery: Essential Linux commands for daily operations
- Storage Management: Filesystems, partitioning, LVM, and RAID
- Network Configuration: Interface management, routing, VLANs, and troubleshooting
- Security Implementation: Firewalls, SELinux, SSH hardening, and encryption
- Performance Optimization: CPU, memory, disk I/O, and network performance tuning
- User Administration: Account management, permissions, and security policies
- System Administration: Services, packages, boot process, logging, and backups
- Troubleshooting Techniques: Systematic approaches to common system issues
- Reference Materials: Quick-lookup tables for codes, permissions, and standards
- Bash Scripting: Complete automation and scripting guide for DevOps
- System Administrators: Managing Linux servers in production environments
- DevOps Engineers: Automating infrastructure and deployment pipelines
- Site Reliability Engineers (SRE): Ensuring system reliability and performance
- Cloud Engineers: Working with Linux-based cloud infrastructure
- Developers: Understanding the Linux environment for application deployment
- IT Students: Learning Linux system administration fundamentals
- Beginners: Starting their journey with Linux command line
- Access to a Linux system (physical machine, virtual machine, or container)
- Basic familiarity with terminal/command line interfaces
- Curiosity and willingness to experiment (in safe environments)
- For advanced topics: intermediate Linux knowledge and scripting basics
Focus: Essential Linux commands for file operations, text processing, system information, network operations, process management, and user administration.
Key Topics:
- File and directory operations (ls, cp, mv, rm, find)
- Text processing tools (grep, sed, awk, cut, sort)
- Archive and compression (tar, gzip, zip)
- Process management (ps, top, kill, systemctl)
- System information commands (df, free, lscpu, lsblk)
- Network commands (ip, ss, ping, curl, wget)
- User management commands (useradd, usermod, passwd)
When to use: Daily Linux operations, command-line productivity, quick system tasks
Focus: Comprehensive storage management including filesystems, partitioning, LVM, and RAID configurations.
Key Topics:
- Filesystem types and operations (ext4, xfs, btrfs)
- Disk partitioning (GPT, MBR, fdisk, gdisk, parted)
- Logical Volume Management (LVM) - volume groups, logical volumes, snapshots
- RAID configurations and management (software RAID, mdadm)
- Storage optimization and troubleshooting
When to use: Setting up new systems, expanding storage, performance optimization, disaster recovery planning
Focus: Network configuration, routing, VLANs, bonding/teaming, and troubleshooting.
Key Topics:
- Network fundamentals (TCP/IP, OSI model, protocols)
- Interface management (ip command, NetworkManager, nmcli)
- Routing configuration and policy routing
- VLANs and network segmentation
- Network bonding and teaming for redundancy
- Network troubleshooting tools and techniques
When to use: Network configuration, connectivity issues, performance optimization, high availability setups
Focus: System hardening, firewalls, SELinux, SSH security, encryption, and user security.
Key Topics:
- Firewall management (firewalld, nftables, iptables)
- SELinux configuration and troubleshooting
- SSH hardening and key-based authentication
- Encryption (LUKS, dm-crypt, GPG)
- System hardening best practices
- User and access security
When to use: Securing production systems, compliance requirements, incident response, security audits
Focus: System performance analysis, monitoring, and optimization for CPU, memory, disk I/O, and network.
Key Topics:
- CPU performance tuning and monitoring
- Memory management and optimization
- Disk I/O analysis and tuning
- Network performance optimization
- Monitoring tools and frameworks (top, htop, sar, iostat, vmstat)
- Performance baselines and capacity planning
When to use: Performance troubleshooting, capacity planning, system optimization, SLA management
Focus: Complete user and group administration, permissions, and account security.
Key Topics:
- User account creation and management
- Group administration
- File and directory permissions (standard and ACLs)
- User account files (/etc/passwd, /etc/shadow, /etc/group)
- Password policies and account security
- Sudo configuration and privilege escalation
When to use: User provisioning, access control, security policies, compliance requirements
Focus: Service management, package management, boot process, logging, cron jobs, and system maintenance.
Key Topics:
- Service management with systemd (systemctl, journalctl)
- Package management (yum, dnf, apt, zypper)
- Boot process and GRUB configuration
- System logging and log management
- Scheduled tasks (cron, anacron, systemd timers)
- Backup and recovery strategies
- Kernel management
- Containers and virtualization basics
- Database service administration
When to use: Daily system maintenance, software deployment, system updates, troubleshooting boot issues
Focus: Systematic troubleshooting approaches for boot, network, performance, security, and service issues.
Key Topics:
- Boot issue diagnosis and recovery
- Network connectivity troubleshooting
- Performance problem investigation
- Service failure analysis
- Security incident response
- Log analysis techniques
- Troubleshooting methodologies
When to use: System issues, outages, performance degradation, error investigation
Focus: Quick-reference tables for date formats, exit codes, permissions, partition types, network ports, and signals.
Key Topics:
- Date format codes for formatting timestamps
- Shell exit codes and their meanings
- File permission octal codes
- GPT and MBR partition type identifiers
- Common network port numbers
- Linux signal numbers and names
When to use: Quick lookups during scripting, troubleshooting, configuration, system design
Focus: Complete shell scripting guide from basics to advanced DevOps patterns, automation, and best practices.
Key Topics:
- Shell scripting fundamentals (variables, operators, conditionals, loops)
- Functions and arrays
- String manipulation and text processing
- File operations and I/O redirection
- Process management and signals
- Debugging techniques
- Advanced I/O and performance optimization
- DevOps automation patterns
- CI/CD integration
- Security best practices
- Monitoring and logging scripts
- Real-world examples and templates
When to use: Automation, deployment scripts, system monitoring, batch operations, DevOps pipelines
Week 1-2: Start Here
- Read @_START_HERE.md) for orientation
- Work through @_OVERVIEW.md)
- Learn basic text processing: @_OVERVIEW.md)
- Practice with QUICK_START_GUIDE.md
Week 3-4: Build Skills
- User management basics: @_OVERVIEW.md)
- Basic bash scripting: @_OVERVIEW.md)
- System information: @_OVERVIEW.md)
Essential Sections (Priority Order):
- @_OVERVIEW.md) - Review all command categories
- @_OVERVIEW.md) - User and permission management
- @_OVERVIEW.md) - Service and package management
- @_OVERVIEW.md) - Security hardening and firewall
- @_OVERVIEW.md) - Problem-solving techniques
- @_OVERVIEW.md) - Storage management
- @_OVERVIEW.md) - Network configuration
Focus Areas (Automation-First):
- @_OVERVIEW.md) - Complete scripting mastery
- @_OVERVIEW.md) - Systemd and services
- @_OVERVIEW.md) - Performance monitoring and tuning
- @_OVERVIEW.md) - Security automation
- @_OVERVIEW.md) - Container technologies
- @_OVERVIEW.md) - Log parsing and data extraction
When Things Go Wrong:
- @_OVERVIEW.md) - Start here for systematic approaches
- @_OVERVIEW.md) - Log analysis
- @_OVERVIEW.md) - Performance issues
- @_OVERVIEW.md) - Network problems
- @_OVERVIEW.md) - Quick code lookups
- @_START_HERE.md) - Complete introduction and orientation
- Quick Start Guide - Fastest path to productivity
- Complete Index - Alphabetical listing of all files
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
- @_OVERVIEW.md)
This guide follows consistent documentation standards across all sections:
Target Distributions (2024-2026):
- Red Hat Enterprise Linux 8, 9, 10
- Ubuntu 22.04 LTS, 24.04 LTS
- SUSE Linux Enterprise Server 15
- Fedora 38+, openSUSE Leap 15+
Legacy commands and tools are clearly marked with deprecation warnings and modern alternatives are provided. Examples:
ifconfig→ipcommandnetstat→sscommandservice→systemctlnetwork-scripts→NetworkManager/netplan
Each section and topic includes:
- Purpose: What the topic covers and why it matters
- Prerequisites: What you should know before starting
- Examples: Practical, tested examples with explanations
- Best Practices: Do's and don'ts
- Troubleshooting: Common issues and solutions
- Security Considerations: Security implications and hardening
- Performance Notes: Performance impact and optimization
- Related Topics: Cross-references to related content
All examples in this guide:
- Are tested on modern Linux distributions
- Include expected output where helpful
- Explain each command option
- Note potential risks or side effects
- Provide context for when to use each technique
- Include both simple and real-world scenarios
This is a practical guide - every topic includes examples you can run. The best way to learn is:
- Read the concepts to understand the "why"
- Try the examples in a safe environment
- Experiment with variations
- Apply to real-world scenarios
- Document what you learn
Before practicing with destructive commands or system changes:
- Use virtual machines (VirtualBox, VMware, KVM)
- Use containers (Docker, Podman)
- Use cloud instances (AWS, Azure, GCP free tiers)
- Practice in dedicated test environments
- Create snapshots before major changes
Content is structured to build skills progressively:
- Beginner: Basic concepts and simple examples
- Intermediate: Multiple options, command combinations
- Advanced: Complex scenarios, optimization, integration
- Expert: Edge cases, performance tuning, security hardening
DO:
- Test in non-production environments first
- Read documentation (
manpages,--help) - Make backups before destructive operations
- Use version control for configuration files
- Document your changes and procedures
- Implement security best practices
- Monitor and log system activities
- Plan for disaster recovery
- Keep systems updated and patched
DON'T:
- Run unknown commands with sudo/root
- Disable security features without understanding implications
- Skip backups before major changes
- Ignore error messages and warnings
- Use deprecated tools in new implementations
- Hard-code credentials in scripts
- Give excessive permissions (chmod 777, root access)
- Make production changes without testing
Every section in this guide includes security considerations. Key security principles:
- Principle of least privilege
- Defense in depth
- Regular security updates
- Strong authentication
- Encryption for sensitive data
- Audit logging
- Regular security audits
- Incident response planning
System changes can impact performance. Always consider:
- Resource utilization (CPU, memory, disk, network)
- Impact on other services and users
- Scalability implications
- Monitoring and alerting
- Performance baselines
- Capacity planning
This guide prioritizes modern Linux toolsets used in current distributions:
| Category | Modern Command | Replaces | Notes |
|---|---|---|---|
| Network Interfaces | ip |
ifconfig |
Standard in all modern distros |
| Network Statistics | ss |
netstat |
Faster, more detailed |
| Network Config | nmcli |
network-scripts |
NetworkManager CLI |
| Service Management | systemctl |
service, chkconfig |
systemd standard |
| Logging | journalctl |
tail /var/log/* |
Centralized systemd logging |
| Firewall | firewall-cmd |
Direct iptables |
High-level firewall interface |
| Time/Date | timedatectl |
Manual /etc/localtime |
systemd time control |
| Hostname | hostnamectl |
Manual /etc/hostname |
systemd hostname control |
| Distribution | Primary Package Manager | Commands |
|---|---|---|
| RHEL/CentOS/Fedora | DNF (Dandified YUM) | dnf install, dnf update, dnf search |
| Ubuntu/Debian | APT | apt install, apt update, apt search |
| SUSE/openSUSE | Zypper | zypper install, zypper update, zypper search |
pwd # Print working directory
ls -lah # List files with details, hidden files, human-readable sizes
cd /path/to/directory # Change directory
cp -r source dest # Copy recursively
mv source dest # Move or rename
rm -rf directory # Remove directory (CAUTION!)
mkdir -p path/to/dir # Create directory with parents
find /path -name "*.log" # Find files by patternuname -a # System information
hostname # Show hostname
hostnamectl # System hostname and info (modern)
df -h # Disk space usage
free -h # Memory usage
lsblk # List block devices
lscpu # CPU information
uptime # System uptime and loadps aux # List all processes
top # Interactive process monitor
htop # Enhanced process monitor (if installed)
systemctl status service # Check service status
systemctl start service # Start service
systemctl enable service # Enable service at boot
journalctl -u service # View service logs
kill -15 PID # Gracefully terminate process
pkill process_name # Kill by process nameip addr show # Show IP addresses
ip route show # Show routing table
ss -tuln # List listening TCP/UDP ports
ping -c 4 host # Test connectivity (4 packets)
dig domain.com # DNS lookup
curl -I https://url # HTTP request (headers only)
nmcli device status # NetworkManager device statussudo command # Execute as root
su - username # Switch user
whoami # Current user
id # User ID and group info
chmod 755 file # Change file permissions
chown user:group file # Change ownership
passwd username # Change passwordgrep "pattern" file # Search for pattern
grep -r "pattern" /path # Recursive search
sed 's/old/new/g' file # Replace text
awk '{print $1}' file # Print first column
cat file # Display file
less file # View file with pagination
tail -f /var/log/messages # Follow log file
wc -l file # Count linesTotal Content:
- 10 major sections
- 80+ subsection categories
- 500+ individual topics
- 1000+ practical examples
- Reference tables and quick lookups
Depth:
- Beginner to expert level content
- Real-world production scenarios
- Security and compliance considerations
- Performance optimization techniques
- Troubleshooting methodologies
This guide focuses on modern Linux distributions (2024-2026) and is regularly updated to reflect:
- Current best practices
- New features in recent distribution releases
- Security recommendations
- Deprecated command replacements
- Modern DevOps patterns
Target Systems:
- RHEL 8, 9, 10 and derivatives (AlmaLinux, Rocky Linux)
- Ubuntu 22.04 LTS, 24.04 LTS
- SUSE Linux Enterprise Server 15+
- Fedora and openSUSE (latest releases)
As a Learning Resource:
- Follow the recommended learning paths
- Work through examples hands-on
- Practice in safe environments
- Build skills progressively
As a Reference:
- Use the INDEX.md for quick topic lookup
- Bookmark frequently used sections
- Reference @_OVERVIEW.md) for quick code lookups
- Search for specific commands or concepts
For Troubleshooting:
- Start with @_OVERVIEW.md)
- Cross-reference specific subsections
- Follow systematic diagnostic approaches
- Use reference tables for code interpretation
For Automation Projects:
- Deep dive into @_OVERVIEW.md)
- Apply security best practices from @_OVERVIEW.md)
- Reference @_OVERVIEW.md) for scripting constants
- Learn from real-world examples
- Each section has its own overview with detailed navigation
- Cross-references link related topics
- Examples include explanations and context
- Troubleshooting sections address common issues
- Man Pages:
man command_name- authoritative Linux documentation - Info Pages:
info command_name- GNU documentation system - Help Options:
command --help- quick command reference - Distribution Docs: Official documentation for your Linux distribution
- Community: Forums, IRC, Stack Exchange, Reddit
man command # Full manual page
command --help # Quick help summary
info command # Info page (GNU commands)
type command # Show command type
which command # Show command location
whatis command # One-line command descriptionChoose your starting point:
Absolute Beginners: → @_START_HERE.md) Quick Start: → QUICK_START_GUIDE.md Browse Topics: → INDEX.md Jump to Commands: → @_OVERVIEW.md) Jump to Scripting: → @_OVERVIEW.md)
Last Updated: 2026-06-06 Total Sections: 10 Total Files: 500+ Coverage Level: Beginner to Expert Target Distributions: RHEL 8/9/10, Ubuntu 22.04/24.04, SUSE SLES 15+, Fedora 38+