๐ฅ๏ธ System Administration
Core Linux system administration concepts and procedures for managing production servers.
๐งฉ System Fundamentals
- Linux filesystem hierarchy
- systemd services
- SSH configuration
- User and group management
- Package updates and security patches
๐ง Essential Commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | # System status
uptime
top
htop
# Service management
systemctl status <service>
systemctl restart <service>
systemctl enable <service>
# Disk usage
df -h
du -sh *
# Network status
ss -tulpn
ip a
|
๐ SSH Configuration
- Use keyโbased authentication
- Disable password login
- Change default SSH port if needed
- Use
~/.ssh/config for host aliases
Example:
| Host prod
HostName 192.168.1.10
User robert
IdentityFile ~/.ssh/id_rsa
|
๐งฑ Firewall (UFW)
| ufw allow 22
ufw allow 80
ufw allow 443
ufw enable
ufw status
|
๐ ๏ธ System Maintenance
- Apply updates regularly
- Monitor disk usage
- Rotate logs
- Clean unused Docker images/volumes
- Validate backups