• lsof -i tcp:port (port替换成端口号,比如6379)
    • lsof -i :8000 (列出占用端口的程序的pid号)
    • netstat -tunlp |grep 9001
    • nginx -t (校验路径及配置)
    • nginx -s stop (关闭nginx)
    • nginx -c /Users/jiumeng/Documents/Python/PyProjects/MovieWeb/nginx.conf (-c 表示加载配置文件启动)
    • ps aux | grep uwsgi (查看uwsgi进程)
    • sudo service nginx start / stop / status / restart (nginx启动)
    • free -mh (查看内存)
    • find / -name projects -d (查找目录)
    • find /var/www/ -name index.php (查找文件)
    • systemctl enable docker (设置开机启动)
    • passwd (修改root密码)
    • lsblk 查看分区和磁盘
    • df -h 查看空间使用情况
    • du -sh ./* 统计当前目录各文件夹大小
    • 修改数据盘挂载点 /etc/fstab
    • free -h 查看内存
    • df -h 查看硬盘
    • cat /proc/cpuinfo 查看cpu
    • ip addr 查看ip
    • hostnamectl set-hostname testName (设置hostname)
    • hostname (查看hostname)
    • tar -cvf test.tar test (压缩)
    • tar -xvf test.tar (解压)
    • tar -tvf d.tar (查看包内容)