In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "Widows and Linux how to view and operate the port", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Widows and Linux how to view and operate the port" bar!
Open cmd
1.netstat-n
View all ports used on this computer
①. Proto indicates that there are two protocols: tcp and udp
②. Local Address represents the native IP, followed by the port number we use
③ .Foreign Address connects to the IP address of the outside server and the server port
④. State: indicates some specific state, such as: LAST_ACK waiting for the packet used to die
two。 Confirm the port number to be queried
Command netstat-aon | findstr 1044 (specified port number)
The last number of the query result is the pid of the current program or service.
3. Enter the command: tasklist | findstr 2612 (enter the pid queried above)
So you can view the programs running on this port.
Then query from the task manager, you can see the program
4. If we use the specified port number, two schemes
1. End the program running on this port in Task Manager, and then you can use this port number.
two。 Then enter the command in the cmd interface: taskkill / f / pid 2612 (enter the query pid), you can also kill this program
Linux
Netstat-tln # finds all occupied ports
Netstat-tln | grep 80 # find the specified occupied port
Install lsof
Yum install lsof
Through lsof, we can know which program our port belongs to.
Lsof-I: 80 # query port
Kill-9 # Kill process id multiple processes ID is separated by spaces
Thank you for your reading, the above is the content of "how to view and operate the port of Widows and Linux". After the study of this article, I believe you have a deeper understanding of how to view and operate the port of Widows and Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.