自用shell命令

留存~以备后续不时之需

  • 查看网卡信息
ifconfig [eth0] # 查看网卡信息(可能需要安装net-tools)
ip addr show 	# 查看网卡信息
  • 进程相关
ps -ef | aux 	# 查看进程信息
kill -9 进程id 	# 结束进程
top 			# 查看进程资源占用情况
  • 查看网络连接
netstat -taunlp # 查看网络连接信息
  • 用户相关
useradd tom # 添加用户
passwd tom # 修改tom密码
userdel tom -r # 删除tom所有信息
# 检查空口令
awk -F: '($2 == "!!") { print $1 }' /etc/shadow
# 查看UID为0的用户
awk -F: '($3 == "0") { print $1 }' /etc/passwd

猜你喜欢

转载自blog.csdn.net/Nicky_Zheng/article/details/107560865