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