In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly describes how to check whether a port is occupied in LINUX, the article is very detailed, has a certain reference value, interested friends must read it!
1. netstat -anp |grep port number
Here's what I'll do with 3306, netstat -anp.| grep 3306 (Note below, I am operating as an ordinary user, so I add sudo. If I am operating as a root user, I can view it without adding sudo), as shown in Figure 1 below:
In Figure 1, the monitoring status LISTEN indicates occupied, and the last column indicates occupied by mysqld. Check the specific port number. As long as the row in Figure 1 indicates occupied.
2. netstat -nultp (no port numbers here)
This command is to view all currently used ports, as shown in Figure 2:
You can see that my port 82 is not occupied.
3. netstat -anp |grep 82 View the usage of port 82, as shown in Figure 3:
It can be seen that there is no LISTEN line, so it means that it is not occupied. Note here that LISTENING shown in the figure does not mean that the port is occupied. Don't confuse it with LISTEN. When viewing the specific port, you must see tcp, port number, and LISTEN to indicate that the port is occupied.
The above is "LINUX how to check whether a port is occupied" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
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.