linux系统最常用命令(持续更新)

1、重启服务器

ubuntu系统重启apache:/etc/init.d/apache2 restart

linux重启nginx: service nginx restart

   重新加载:service nginx reload

2、查询搜索文件或目录

find path -option filename

find  /  -name test     #根目录下查询test文件或者目录

find  .  -name *.php*  #当前目录下查找.php文件

3、查询端口

查询并显示所有端口:netstat -a

查询固定端口,如果查询后什么都不显示,则说明该端口没有开放。例如查询3306端口:netstat -an|grep 3306

原文地址:https://www.cnblogs.com/enjoyphp/p/linux001.html