In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How does linux check the native ip and port number? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
The commands for linux to view the native ip are the "ifconfig" command and the "ip address" command; the commands for linux to check the port number are the "lsof-i:port" command and the "netstat-aptn" command.
Check the native ip:
1) ifconfig command
The output is as follows:
[root@topgun / home/cly] # ifconfigeth0: flags=4163 mtu 1500 inet 192.168.128.132 netmask 255.255.255.0 broadcast 192.168.128.255 inet6 fe80::20c:29ff:fe45:63ba prefixlen 64 scopeid 0x20 ether 00:0c:29:45:63:ba txqueuelen 1000 (Ethernet) RX packets 1936 bytes 2440516 (2.3MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1207 bytes 94802 (92. 5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 19 base 0x2024 lo: flags=73 mtu 16436 inet 127.0.0.1 netmask 255.0.0.0 inet6:: 1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 12 bytes 744 (744.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12 bytes 744 (744.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
This command belongs to the package:
[root@topgun / home/cly] # pacman-Qo ifconfig/sbin/ifconfig belongs to net-tools 1.60.20120804git-2
2) ip address command
The output is as follows:
[root@topgun / home/cly] # ip address1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:45:63:ba brd ff:ff:ff: Ff:ff:ff inet 192.168.128.132/24 brd 192.168.128.255 scope global eth0 inet6 fe80::20c:29ff:fe45:63ba/64 scope link valid_lft forever preferred_lft forever
This command belongs to the package:
[root@topgun / home/cly] # pacman-Qo ip/usr/sbin/ip belongs to iproute2 3.5.1-1
Linux View Native Port
View the specified port
# lsof-i:port
View all ports
# netstat-aptn
Install telnet
# yum install-y telnet.x86_64
# telnet ip Port
For more information:
Linux to check the usage of native disks
What are the commands for managing processes in linux
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.