windows命令使用

来源:互联网 发布:网络信息安全龙头股票 编辑:程序博客网 时间:2024/04/27 14:28

windows查看某一端口给哪个程序占用:

1、cmd下输入: >netstat -aon | findstr "5037"

>tasklist | findstr "1688"

wmic process get name,executablepath,processid | findstr "10564"  //根据pid查找程序路径

linux
查看那个进程占用了xxx端口
lsof -i:xxx
查看进程号为xxx的进程在哪里
 ps -ef|grep xxx


强制关闭:kill -s 9 1827(PID)

2、window和linux获取所有的环境变量:

在CMD输入:SET 而不加参数,可以显示 Windows OS 当前的环境变量。Linux也一样



原创粉丝点击