menu Chancel's blog
rss_feed
Chancel's blog
时来天地皆同力

Windows结束占用端口程序

作者:Chancel Yang, 时间:2022 May 26, 阅读:38

使用netstat -aon|findstr <port>即可可以查询到占用端口程序的PID

使用tasklist|findstr <pid>即可看到占用程序的相关信息

PS C:\Users\ycs10> netstat -aon|findstr "3389"
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING       1380
  TCP    192.168.11.193:9434    192.168.11.155:3389    ESTABLISHED     4088
  TCP    192.168.11.193:11526   192.168.11.214:3389    ESTABLISHED     4088
  TCP    [::]:3389              [::]:0                 LISTENING       1380
  UDP    0.0.0.0:3389           *:*                                    1380
  UDP    [::]:3389              *:*                                    1380
PS C:\Users\ycs10> tasklist|findstr "1380"
svchost.exe                   1380 Services                   0     15,464 K
chrome.exe                   13808 Console                    1     13,440

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]