Linux system administration involves managing, maintaining, and securing Linux-based systems and networks.
# System info
uname -a # System/kernel information
lsb_release -a # Distribution information
df -h # Disk usage
free -h # Memory usage
top # Process information
htop # Interactive process viewer
# User Management
useradd # Add new user
usermod # Modify user
userdel # Delete user
passwd # Change password
id # User/group info
# File Operations
ls -la # List files with details
chmod # Change permissions
chown # Change ownership
find # Search files
tar # Archive files
# Permission Types
r (read) = 4
w (write) = 2
x (execute) = 1
# Common Permission Sets
chmod 755 # rwxr-xr-x
chmod 644 # rw-r--r--
chmod 700 # rwx------
#!/bin/bash
# System health check
echo "Disk Usage:"
df -h
echo -e "\nMemory Usage:"
free -h
echo -e "\nSystem Load:"
uptime
echo -e "\nActive Services:"
systemctl list-units --type=service --state=running