Use the ip addr command in centos to view the current IP address of the system. You can see that the current IP address is 10.0.0.3.
Recommendation: "centos usage tutorial"
ip addr is another command to check ip in Linux besides ifconfig. You can first take a look at the output of this command:
[root@localhost ~]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 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 valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:e7:d7:08 brd ff:ff:ff:ff:ff:ff inet 192.168.3.9/24 brd 192.168.3.255 scope global eno16777736 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fee7:d708/64 scope link valid_lft forever preferred_lft forever
The command result on my machine displays two parts, lo and eth0. If there are multiple network cards, each network card will display one part.
lo: The full name is loopback, which is the loopback address. It is often assigned to the 127.0.0.1 address and is used for local communication. It returns directly after kernel processing and will not appear on any network.
eth0: Network card name. If there are multiple network cards, there will be multiple eth or other names.
Recommended learning: Linux video tutorial
The above is the detailed content of How to check ip on centos. For more information, please follow other related articles on the PHP Chinese website!