In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Sometimes we need to know the occupation of a port in the system in order to relieve the occupation of the port by the program, and this article mainly introduces the method of viewing the linux port, which has a certain reference value, and friends who need it can refer to it. Let's take a look at it with me.
How to view linux ports
1. Lsof-I: the port number is used to view the occupancy of a port, for example, to check the usage of port 8000, and lsof-i 8000.
# lsof-i:8000COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMElwfs 22065 root 6u IPv4 4395053 0t0 TCP *: irdmi (LISTEN)
2. Netstat-tunlp | grep port number, which is used to view the progress of the specified port number. For example, for port 8000, netstat-tunlp | grep 8000
# netstat-tunlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0 0 only servers 111 0.0.0 0 LISTEN 4814/rpcbind tcp 0 0 0.0.0 0 0.0.0.0 * LISTEN 25492/qemu-kvm tcp 0 00.0.0.0vel6996 0.0.0.0 LISTEN 22065/lwfs tcp 0 192.168.122.1 Vol 53 0.0.0.0Vol * LISTEN 38296/dnsmasq tcp 0 0 0.0.0.0 LISTEN 5013/cupsd tcp 22 0.0.0.0 LISTEN 5013/cupsd tcp 0 0 127.0.0.1 LISTEN 44868/lwfs tcp 25 0.0.0.0 LISTEN 5962/master tcp 00 0.0.0.015 8666 0.0.0.0 LISTEN 44868/lwfs tcp 00 0.0.0.0000 0.0.0.0 grep 8000tcp * LISTEN 22065/lwfs# netstat-tunlp | grep 8000tcp 00 0.0.0.0 grep 8000tcp 8000 0.0.0.0 LISTEN 22065/lwfs
The above is a brief introduction to the way to view the linux port, of course, the detailed use of the above differences have to be used by everyone to understand. If you want to know more, 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.