linux-administration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLinux Administration
Linux 系统管理
Core Linux system administration skills.
Linux系统管理核心技能。
Package Management
软件包管理
bash
undefinedbash
undefinedDebian/Ubuntu
Debian/Ubuntu
apt update && apt upgrade -y
apt install nginx
apt remove nginx
apt autoremove
apt update && apt upgrade -y
apt install nginx
apt remove nginx
apt autoremove
RHEL/CentOS
RHEL/CentOS
dnf update
dnf install nginx
dnf remove nginx
undefineddnf update
dnf install nginx
dnf remove nginx
undefinedSystem Information
系统信息
bash
uname -a # Kernel info
hostnamectl # System info
lscpu # CPU info
free -h # Memory usage
df -h # Disk usage
ip addr # Network interfacesbash
uname -a # 内核信息
hostnamectl # 系统信息
lscpu # CPU信息
free -h # 内存使用情况
df -h # 磁盘使用情况
ip addr # 网络接口Log Management
日志管理
bash
journalctl -u nginx # Service logs
journalctl -f # Follow logs
tail -f /var/log/syslog # System logs
dmesg # Kernel messagesbash
journalctl -u nginx # 服务日志
journalctl -f # 实时跟踪日志
tail -f /var/log/syslog # 系统日志
dmesg # 内核消息Process Management
进程管理
bash
ps aux | grep nginx
top / htop
kill -9 <pid>
pgrep nginx
pkill nginxbash
ps aux | grep nginx
top / htop
kill -9 <pid>
pgrep nginx
pkill nginxBest Practices
最佳实践
- Regular updates
- Minimal installed packages
- Proper file permissions
- Log rotation configuration
- Automated backups
- 定期更新
- 最小化已安装软件包
- 正确设置文件权限
- 配置日志轮转
- 自动化备份