Get the App
SLTechnology News&Howtos  ›  Servers  › 

There is no ifconfig solution for linux.

Shulou Source: shulou.com Published: 2022-05-31 10:57:25 09月21日 Update

This article mainly introduces the linux without ifconfig solution, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Solution: 1, execute the "yum search ifconfig" command to search ifconfig, you will find the ifconfig tool in the net-tools toolkit; 2, execute the "yum install net-tools package name" command, and install the net-tools toolkit.

The operating environment of this tutorial: CentOS 6 system, Dell G3 computer.

The ifconfig command is a program that sets or displays the network interface, which can display the network card information of our machine, but sometimes when installing CentOS and other Linux distributions, commands such as ifconfig will not be installed by default. When you enter the terminal, there will be an error when you run the ifconfig command.

First of all, think about whether there is no path of the ifconfig command in the environment variable, because ifconfig is under the / sbin path. You can only run it if you log in with the root user. Take a look at the environment variable of the root user.

There is a path / sbin in the environment variable, that is, if the ifconfig command exists and is located in the / sbin directory, it must be runnable, so check to see if there is an ifconfig command in the / sbin directory.

The results show that there is no ifconfig command in the / sbin directory, so ifconfig is not installed in CentOS.

Solution: install ifconfig using yum

Through the command yum search, we find that the command ifconfig is in the net-tools toolkit, and then we just need to install this package.

Check whether the installation is successful

It worked successfully!

At this time, do you have the same doubts as I did at that time? you don't have to install the ipconfig command in windows when it comes to linux. It turns out that the ifconfig command comes from net-tools, and there are commands such as ifconfig,netstat,whois in this package, so you can't run these commands before.

Thank you for reading this article carefully. I hope the article "there is no solution to linux without ifconfig" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Commands runs tools environment articles methods variables toolkits directories paths success that is at the time the user the minimum and then under that is to say Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Huawei macOS Xiaomi