常用命令
可能需要用到的 Linux 命令(来源:linux_cheat_sheet)
版本
# Debian/Ubuntu
uname -a
lsb_release -a
# CentOS/RedHat
cat /etc/centos-release
cat /etc/redhat-release
# This will provide a lot more information
cat /etc/os-release
系统
# 重启服务器
reboot
# 查看内存使用
free
# 查看硬盘使用
df -hl
# 查看 Docker 容器
sudo docker ps -a
# 查看端口
netstat -tunlp
# 查看所有环境变量
env