Home > Article > Operation and Maintenance > How to check the ip address of centos
You can directly use the ifconfig eth0 command to check the IP address of centos:
Recommended tutorial: centos usage tutorial
[***@localhost ~]$ ifconfig eth0 eth0 Link encap:Ethernet inet addr:192.168.91.132 Bcast:192.168.91.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:feb3:45b3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:46481 errors:0 dropped:0 overruns:0 frame:0 TX packets:32811 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:52759994 (50.3 MiB) TX bytes:2879378 (2.7 MiB) Interrupt:19 Base address:0x2024
or Use the "ifconfig|grep 'Bcast'" command to view:
inet addr:192.168.91.132 Bcast:192.168.91.255 Mask:255.255.255.0
The ifconfig command is used to configure and display the network parameters of the network interface in the Linux kernel. The network card information configured with the ifconfig command will no longer exist after the network card is restarted and the machine is restarted. If you want to store the above configuration information in your computer forever, you need to modify the configuration file of the network card.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to check the ip address of centos. For more information, please follow other related articles on the PHP Chinese website!