• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ifconfig command not found – CentOS/RHEL 7

by admin

Problem :

ifconfig is missing in the Minimal Install of Red Hat Enterprise Linux 7 (RHEL 7):

# ifconfig
-bash: ifconfig: command not found

Solution

In 2009, Red Hat decided to deprecate ifconfig as the default command line network interface management utility, because the “net-tools” package (which provides ifconfig) did not support InfiniBand addresses (commonly used interconnect in high-performance computing applications). InfiniBand addresses were too big for ifconfig to display; therefore, it was necessary to deprecate ifconfig and to find a tool that could display long InfiniBand addresses.

Installing ifconfig

You can still install net-tools package to get the ifconfig command working. The following command will install “net-tools” on your system:

# yum install net-tools

Alternatives to ifconfig

Use ip addr to see the IP addresses of your networking devices:

# 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:45:e9:ae brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.107/24 brd 192.168.1.255 scope global dynamic eno16777736
       valid_lft 86349sec preferred_lft 86349sec
    inet6 fe80::20c:29ff:fe45:e9ae/64 scope link
       valid_lft forever preferred_lft forever

Use the command nmcli d show (NetworkManager Command Line Interface, device, show) to see more in-depth information about your networking devices:

# nmcli  d show

GENERAL.DEVICE:                         eno16777736
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:0C:29:45:E9:AE
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     eno16777736
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/3
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.1.107/24
IP4.GATEWAY:                            192.168.1.1
IP4.DNS[1]:                             182.48.200.3
IP4.DNS[2]:                             114.79.129.4
IP6.ADDRESS[1]:                         fe80::20c:29ff:fe45:e9ae/64
IP6.GATEWAY:

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:

Filed Under: CentOS/RHEL 7

Some more articles you might also be interested in …

  1. “not enough to start the array” – error while staring mdadm RAID array
  2. How to use mdadm to create a software mirror on top of multipath devices
  3. CentOS / RHEL 7 : How to remove rescue image using grubby
  4. Troubleshooting “connection refused” From Remote Servers in CentOS/RHEL 7 (Either Firewalld or iptables service issue)
  5. Beginners guide to Kernel Module Configuration in Linux
  6. How to create partitions and file systems on DM-Multipath devices
  7. “Could not resolve proxy: https; Unknown error” – error with ‘yum update’
  8. How to Change Default Port of Apache On RHEL/CentOS 7
  9. How to configure the logging of failed login attempts for vsftpd
  10. /var/cache/yum Constantly Filling Files System in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright