Linux 应急排查命令速查
admin
2026-10-26 23:16
114人看过
免费
## 使用原则
先保全证据(拷贝关键文件/记录时间线),再做变更;生产操作需变更窗口与双人复核。
## 进程与服务
```bash
ps auxf
systemctl list-units --type=service --state=running
ls -l /proc/<pid>/exe /proc/<pid>/cwd
```
## 网络
```bash
ss -antup
ip a
# 关注异常监听与外连
```
## 持久化常见位置
```bash
crontab -l
ls /etc/cron.* /var/spool/cron
systemctl list-unit-files | grep enabled
ls /etc/rc.local /etc/profile.d/
```
## 账号与登录
```bash
last -a | head
lastb | head
cat /etc/passwd /etc/shadow # 只读检查异常账号
```
## 输出建议
将命令结果按「时间 / 主机 / 发现 / 处置」写入事件单,便于复盘。
版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载或以其他方式使用本站原创内容。