Home  >  Article  >  Operation and Maintenance  >  How to check the ip address of centos

How to check the ip address of centos

尚
Original
2020-03-20 13:46:358168browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn