In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to check which port a process occupies under Linux". The explanation in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "how to check which port is occupied by a process under Linux".
Sometimes you need to look under Linux to see which port a process occupies, but only know the general name of the process, such as to see on which port hadoop's namenode is running in order to connect in eclipse.
First use the ps command to view the id of the process:
The code is as follows:
$ps-ef | grep Name
The second field for each line (which takes up several lines for a long time) is the process's id.
Of course, processes running in the java virtual machine, such as hadoop daemons, can be viewed directly with the jsp command:
The code is as follows:
$jps | grep Name
Or if you already know the exact name of the process, you can check it with pidof:
The code is as follows:
$pidof Name
After you see the process id, use the netstat command to see the port it occupies:
The code is as follows:
$netstat-nap | grep pid
Thank you for your reading, the above is the content of "how to check which port a process occupies under Linux". After the study of this article, I believe you have a deeper understanding of how to check which port is occupied by a process under Linux. 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.