查看版本:lsb_release -a
动态查看进程:top
查看内存占用:free -h free -h – 查看内存使用情况,带单位,更人性化显示查看结果:
used:已使用内存free:可用内存cached:缓存,是可以清除的,方法见下清除缓存
echo 1 > /proc/sys/vm/drop_caches --释放网页缓存 echo 2 > /proc/sys/vm/drop_caches --释放目录项和索引 echo 3 > /proc/sys/vm/drop_caches --释放网页缓存,目录项和索引ps -A:显示所有进程信息 ps aux | grep nginx:查看某个程序的进程
hostname -i:查看内网ip curl -s ipecho.net/plain: 查看外网ip
uname -a
会把 filename 文件里的最尾部的内容显示在屏幕上,并且不断刷新,只要 filename 更新就可以看到最新的文件内容。
tail -f filename