nginx
tasklist /nh|find /i "nginx.exe" # 查看nginx是否运行,可以看到端口号
taskkill /F /pid 13988 # 根据杀掉nginx进程
taskkill /F /pid 23808 # 根据杀掉nginx进程
Linux 命令
descn | command |
---|---|
端口链接情况 | netstat -tnpl|grep 8089 |
开启8089防火墙 | firewall-cmd --permanent --add-port=8089/tcp |
重启防火墙 | firewall-cmd --reload |
查找nginx | cat /etc/rc.d/rc.local or nginx -V |
nginx启停(nginx目录) | ./nginx && ./nginx -s stop |
nginx启停(不用关心在哪个目录) | /usr/local/nginx/sbin/nginx -s stop && /usr/local/nginx/sbin/nginx |
Windows 控制台命令
Win+R打开,如图:
命令:
cmd - 打开控制台
regedit - 打开注册表
# 查询端口号61616
netstat -ano|findstr "61616"
# 查询PID11336的应用
tasklist /fi "pid eq 11336"
# 杀掉PID11336的应用
taskkill /pid 11336 -t -f