Linux Sysadmin Commands Guide

Linux Sysadmin Commands Guide Introduction As a Linux system administrator, mastering essential commands is crucial for managing servers, monitoring systems, and troubleshooting issues. This guide covers fundamental Linux commands for system administration, focusing on user management, process control, network diagnostics, and system monitoring, with practical examples. Prerequisites A Linux system (e.g., Ubuntu, CentOS, or Debian). Root or sudo privileges. Basic familiarity with the terminal. System Information Hardware and System Overview # Display system information uname -a # Show CPU details lscpu cat /proc/cpuinfo # Display memory usage free -h cat /proc/meminfo # List block devices (disks) lsblk fdisk -l # Requires sudo # Show mounted filesystems df -h System Uptime and Load # Display system uptime and load average uptime # Show load average cat /proc/loadavg # Interactive system monitoring top htop # If installed User and Group Management Managing Users # Add a new user sudo useradd -m -s /bin/bash username # Set a password for the user sudo passwd username # Modify user details sudo usermod -aG groupname username # Add user to a group sudo usermod -s /bin/zsh username # Change shell # Delete a user sudo userdel -r username # Remove user and home directory Managing Groups # Create a new group sudo groupadd groupname # Add user to a group sudo usermod -aG groupname username # List groups getent group # Delete a group sudo groupdel groupname Example: Creating a User with Specific Permissions Create a user devuser with sudo privileges: ...

September 26, 2025 · 6 min · 1066 words · Manzolo
Bash terminal

Essential Bash Commands - File Management and System Analysis

Introduction In this tutorial, we’ll explore fundamental Bash commands that every developer should master. We’ll start with disk space analysis and expand to cover essential file operations. Disk Space Analysis Basic Command Here’s a useful command to list files by size: du -sh * | sort -h Command Breakdown du -sh *: du = disk usage -s = summary (total only for directories) -h = human-readable format (KB, MB, GB) * = all files/directories in current folder sort -h: sorts human-readable values numerically ...

September 25, 2025 · 4 min · 703 words · Manzolo

Rescuing a Failing Disk with ddrescue

Rescuing a Failing Disk with ddrescue ℹ️Info Use case: a disk that reads slowly, throws I/O errors, disappears from the bus or refuses to boot. Get the data off it before attempting any repair - and never repair the patient. 🧭 You repair the image, not the disk chkdsk /f, fsck and sfc /scannow all write. On a drive that is losing sectors, every one of them can turn a recoverable situation into a permanent loss. ...

September 18, 2026 · 17 min · 3442 words · Manzolo

Network Troubleshooting: A Layered Diagnostic Method

Network Troubleshooting: A Layered Diagnostic Method ℹ️Info Use case: a machine on the LAN does not respond, or responds halfway. Instead of trying commands at random, work out which layer the problem is actually on. 🧭 You diagnose from the bottom up Cable, link, IP, gateway, DNS, port, application. In that order. ...

September 18, 2026 · 22 min · 4557 words · Manzolo