Linux 查看服务状态及开发端口

查看 nginx 开启状态:

service nginx status
systemctl status nginx

查看进程状态:

service php-fpm status
systemctl status php-fpm

查看开启端口:

netstat -antp #查看目前服务器开启的所有端口

查看80端口:

netstat -anp | grep 80  #查看80端口占用情况

查看本机开放的端口,会扫描所有端口:

nmap 127.0.0.1 

查看 Linux 环境变量:

echo $PATH;

查看配置:

export

重启服务:

shutdown -r now

 

posted @ 2021-11-26 11:32  幻月无名  阅读(372)  评论(0编辑  收藏  举报