Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS7 minimized installation can not find the 'ifconfig' command - Repair Tips     - Ubuntu 14.04 How to install Cinnamon 2.4.5 (Linux)

- Java NIO in the world (Programming)

- Git version rollback (Linux)

- AFNetworking + Nginx HTTPS communication server + (Server)

- socket busy poll of Linux kernel 3.11 to avoid sleep switch (Linux)

- Install and manage Java under mac (Linux)

- Ubuntu 15.04 installation MATE 1.10 (Linux)

- gzip, bzip2, xz, tar, zip compression, archive Detailed (Linux)

- Android main thread message system (Handler Looper) (Linux)

- CentOS Linux firewall configuration and Close (Linux)

- mysqldump implement database logical backup (Database)

- Under CentOS yum install Nginx smooth switch mounted to Tengine (Server)

- Linux Network Programming - raw socket instance: MAC header message analysis (Programming)

- Embedded Linux Optimization (Programming)

- How to install the NVIDIA 358.16 driver in Ubuntu 15.10,14.04 (Linux)

- Ubuntu Apache2 setting, problem solving css, pictures, etc. can not be displayed (Server)

- CentOS NAT iptables (Linux)

- ARM constant expression (Programming)

- MongoDB in bulk timestamp change the date format (Database)

- MySQL configuration file my.cnf increase the log file parameter error (Database)

 
         
  CentOS7 minimized installation can not find the 'ifconfig' command - Repair Tips
     
  Add Date : 2018-11-21      
         
         
         
  As we know, "ifconfig" command is used to configure the network interface GNU / Linux system. It displays detailed information about the network interface card, including the IP address, MAC address, and network interface card status and the like. However, this command is obsolete, and in minimizing the release of RHEL 7 and its clone CentOS 7, Oracle Linux 7 and Scientific Linux 7 also can not find the command.

How to find NIC IP and other details in the CentOS minimize server version?

CentOS 7 minimize system using "ip addr" and "ip link" command to find the card details. You know the statistics, you can use the "ip -s link".

To view the details of the card, enter the following command:

ip addr
Sample output:

1: lo: < LOOPBACK, UP, LOWER_UP> 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 forever
2: venet0: < BROADCAST, POINTOPOINT, NOARP, UP, LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link / void
inet 127.0.0.1/32 scope host venet0
inet 192.168.1.101/32 brd 192.168.1.101 scope global venet0: 0
To view the network interface statistics, enter the command:

ip link
Sample output:

1: lo: < LOOPBACK, UP, LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT
link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
2: venet0: < BROADCAST, POINTOPOINT, NOARP, UP, LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
link / void
or

ip -s link
Sample output:

1: lo: < LOOPBACK, UP, LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT
link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
RX: bytes packets errors dropped overrun mcast
000000
TX: bytes packets errors dropped carrier collsns
000000
2: venet0: < BROADCAST, POINTOPOINT, NOARP, UP, LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
link / void
RX: bytes packets errors dropped overrun mcast
851,566,766,670,000
TX: bytes packets errors dropped carrier collsns
30040342490000
How to enable and use the "ifconfig" command in CentOS 7 minimize server version?

If you do not know where to find the ifconfig command, follow these simple steps to find it. First, let's find out which package provides the ifconfig command. To accomplish this task, enter the following command:

yum provides ifconfig
Sample output:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* Base: centos.aol.in
* Extras: centos.aol.in
* Updates: centos.aol.in
net-tools-2.0-0.17.20131004git.el7.x86_64: Basic networking tools
Repo: @base
Matchedfrom:
Filename: / usr / sbin / ifconfig
Or you can use the following command.

yum whatprovides ifconfig
Here, "provides" or "whatprovides" switch is used to identify a package provides some feature or file.

In the above output as you can see in, net-tools package provides the ifconfig command. So, let's install net-tools package to use the ifconfig command.

yum install net-tools
Now, you can use the usual ifconfig commands.

ifconfig -a
Sample output:

lo: flags = 73 < UP, LOOPBACK, RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 :: 1 prefixlen 128 scopeid 0x10 < host>
loop txqueuelen 0 (LocalLoopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
venet0: flags = 211 < UP, BROADCAST, POINTOPOINT, RUNNING, NOARP> mtu 1500
inet 127.0.0.1 netmask 255.255.255.255 broadcast 0.0.0.0 destination 127.0.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)
RX packets 7073 bytes 8549159 (8.1MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4611 bytes 359201 (350.7KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
venet0: 0: flags = 211 < UP, BROADCAST, POINTOPOINT, RUNNING, NOARP> mtu 1500
inet 192.168.1.101 netmask 255.255.255.255 broadcast 192.168.1.101 destination 192.168.1.101
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)
Enjoy it!
     
         
         
         
  More:      
 
- SUSE Linux install Oracle 10g and problem solving (Linux)
- RPM package creation Getting Started (Linux)
- Configuring s3c-linux-2.6.28.6-Real6410 appears Unable to find the QT3 installation (Linux)
- Linux / Unix system-level IO (Linux)
- To teach you how to safely send mail (Linux)
- Installation Flow N Play- interface stylized video player on Ubuntu (Linux)
- Python 3 for instructions encoded string conversion (Programming)
- Install Web-based monitoring tool: Linux-Dash (Server)
- I use the desktop environment in GNU / Linux combination tool (Linux)
- Android Activity launchMode (Programming)
- Linux system components Detailed log (Linux)
- Some common regular expressions (Linux)
- Learn about EditText little depth (Programming)
- How Linux system password security guarantee (Linux)
- CentOS 6.5 system installation Oracle11.2.0.4 basic steps (Database)
- Construction of Android and iOS apps use Jenkins Automation (Programming)
- Linux rights management (Linux)
- Oracle SQL statement to retrieve data paging table (Database)
- How to fix fatal error: security / pam_modules.h: No such file or directory (Linux)
- bash login and welcome message: / etc / issue, / etc / motd (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.