In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux system how to remove the port occupation, the article is very detailed, has a certain reference value, interested friends must read it!
Method 1 find the process based on the port
Sudo lsof-I: get the result:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME python3 3265 root 3U IPv4 98407 0t0 TCP *: http (LISTEN) View shows that the process occupying the port ID is 3265
To find a process based on the program name, note that you need to enter a complete program name, for example:
Pidof python3 kills the process
Sudo kill method 2 when we know the name of the process that needs kill, we can kill according to the process name:
Sudo pkill method 3 I have measured that the process kill does not drop. Even if you execute pidof after using sudo kill, you can still see the process number. In this case, you can use kill-9.
The online explanation of the difference between kill and kill-9 is as follows:
In fact, kill sends a signal to a process id. The default signal is SIGTERM, while the signal sent by kill-9 is SIGKILL, or exit. The exit signal will not be blocked by the system, so kill-9 can kill the process smoothly. Of course, you can also use kill to send other signals to processes.
The above is all the contents of the article "how to remove port occupation in Linux system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow 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.