+2 votes
281 views
in Linux by
recategorized by
I am trying to check network details from my Linux server with the command ifconfig, it should be working, I used it before, but in my new Linux system, there is this error "ifconfig command not found" while running the command "ifconfig", Any resolution?

3 Answers

+1 vote
by

Mostly the net-tools package is not installed in your system, install it and check again.
 

Debian/Ubuntu : apt install net-tools

Centos/Redhat : yum install net-tools

by
Thank you so much, it is working now
0 votes
by

If you receive an error message that says "ifconfig not found," it means that the ifconfig command cannot be found on your system. The ifconfig command is a command-line utility that is used to configure network interfaces on Unix-like operating systems, such as Linux and macOS. It is typically used to display information about the network interfaces on a system, or to configure the settings of these interfaces.

If you receive the "ifconfig not found" error message, it is likely that the ifconfig command is not installed on your system, or that it is not included in your system's PATH environment variable. To fix this error, you can try installing the ifconfig command using your system's package manager (such as apt-get on Ubuntu or yum on Fedora), or you can add the directory containing the ifconfig command to your PATH environment variable. Consult the documentation for your specific operating system for more detailed instructions.
 

To install the ifconfig command on a Unix-like operating system, such as Linux or macOS, you can use your system's package manager. The exact steps to do this will depend on the specific operating system you are using and the package manager it uses. Here are some general instructions that may be helpful:

  1. Open a terminal window or command prompt.
     
  2. Use the package manager to search for the ifconfig command. For example, on Ubuntu, you can use the following command: apt-get search ifconfig
     
  3. Install the ifconfig command using the package manager. For example, on Ubuntu you can use the following command: apt-get install net-tools

The ifconfig command should now be installed on your system and you should be able to use it to configure your network interfaces. Consult the documentation for your specific operating system for more detailed instructions.a

0 votes
by

The ifconfig command is used to configure network interfaces on Linux systems. It appears that you are trying to run the ifconfig command on a system that does not have it installed, or it is not in the system's PATH environment variable. To fix this error, you can try installing the net-tools package, which includes the ifconfig command, or you can use the ip command, which is a more modern and versatile alternative to ifconfig. For example, to view the IP address of a network interface, you can use the following command:

ip addr show

Alternatively, you can specify the name of the interface you want to view the IP address of, like this:

ip addr show eth0

Note that the ifconfig command is deprecated on many Linux systems and has been replaced by the IP command, which provides more functionality and is easier to use. It is recommended to use the IP command instead of ifconfig whenever possible.

...