How to resolve CentOS 8 / RHEL 8’s ifconfig command not being found? Core

ifconfig is a command-line utility that displays network interfaces associated to Linux Servers as well as network information like IP addresses, netmask, and so on and network interfaces have been assigned to them.

It also shows the number of transmitted and received network packets, as well as the number of error and dropped packets.

When you use the ifconfig command after a minimum CentOS 8 / RHEL 8 installation, you can see an error like command not found.

bash: ifconfig: command not found

This post will show you how to get the ifconfig command by installing the appropriate packages.

Install ifconfig Package

Using the YUM command, let’s see which package supplies the ifconfig tool.

yumwhatprovidesifconfig

Output:

CentOS-8 – AppStream                                     1.1 MB/s | 6.3 MB     00:05

CentOS-8 – Base                                          954 kB/s | 7.9 MB     00:08

CentOS-8 – Extras                                        569  B/s | 2.1 kB     00:03

Extra Packages for Enterprise Linux 8 – x86_64           617 kB/s | 3.2 MB     00:05

net-tools-2.0-0.51.20160912git.el8.i686 : Basic networking tools

Repo        : BaseOS

Matched from:

Filename    : /usr/sbin/ifconfig

net-tools-2.0-0.51.20160912git.el8.x86_64 : Basic networking tools

Repo        : BaseOS

Matched from:

Filename    : /usr/sbin/ifconfig

Name of the ifconfig package: As you can see from the previous line, the net-tools package includes the ifconfig command. Using the yum command, install the net-tools package.

yum -y install net-tools

Output:

Last metadata expiration check: 0:00:51 ago on Mon 04 Nov 2019 09:07:03 AM EST.

Dependencies resolved.

=========================================================================================

 Package           Arch           Version                           Repository      Size

=========================================================================================

Installing:

net-tools         x86_64         2.0-0.51.20160912git.el8          BaseOS         323 k

Transaction Summary

=========================================================================================

Install  1 Package

Total download size: 323 k

Installed size: 1.0 M

Downloading Packages:

net-tools-2.0-0.51.20160912git.el8.x86_64.rpm            264 kB/s | 323 kB     00:01

—————————————————————————————–

Total                                                    148 kB/s | 323 kB     00:02

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Preparing        :                                                                 1/1

  Installing       : net-tools-2.0-0.51.20160912git.el8.x86_64                       1/1

  Running scriptlet: net-tools-2.0-0.51.20160912git.el8.x86_64                       1/1

  Verifying        : net-tools-2.0-0.51.20160912git.el8.x86_64                       1/1

Installed:

net-tools-2.0-0.51.20160912git.el8.x86_64

Complete!

Once the installation is complete, then run ifconfig to see whether it is available or not.

Once the installation is complete, use ifconfig to see if the result shows the network information is available.

ifconfig

Output:

View network information with ifconfig command

At Velan, our server support engineers can fix missing components &manage your Linux server. If you are interested in our service, please fill the Quick connect form to get in touch with us.

Credentials

Quick Connect With Us


    captcha
    reload