Centos 7 Installation ifconfig management commands

Source: Internet
Author: User

1. Installation Requirements Background

We know that the ifconfig command can be used to view, configure, enable, or disable a specified network interface, such as configuring the IP address, mask, broadcast address, gateway, etc. of the network card, which is not rich in functionality.

The functionality of this command is very similar to the ipconfig of Windows systems.

However, CentOS 7 no longer installs this command by default, many of which are replaced with IP addr directives.

Given that many of the existing management tools or scripts call this feature command (ifconfig), if these tools are migrated directly to the error, if you replace the directive with other instructions, and upgrade these tools, you increase the workload and increase the risk of errors.

Therefore, it is necessary to install the Ifconfig command in the CentOS 7 system.

2. Specific steps for testing the installation

The Centos 7 system does not have the Ifconfig command installed by default.

If you run the ifconfig command directly, you are prompted with an error:-bash:ifconfig:command not found

At this point, the View/sbin directory, in fact, there is no ifconfig file.

So how to install ifconfig? The first thing we think about is running yum install ifconfig . What is the effect of the implementation?

The result is:

No Package ifconfig available.
Error:nothing to do

Ah?! Without the Ifconfig installation package, are we going to give up?

In fact, we can also search the package by using the search option of the Yum command.

Search: You can search for a software name or an important keyword for a description (description). This directive can find out which of the relevant software is displayed.

So, before giving up, let's run the following command:

Yum Search Ifconfig

The result of the above operation, we only need to analyze the best line. matched: ifconfig This split-line is used to display matching results.

The data before the colon (:) in the last line, (net-tools.x86_64 ) is the matching package; the data after the colon (:) is the description of the former bread (Basic networking Tools ).

In combination with the above information, you will be prompted by running Yum Search ifconfig : Installing the Ifconfig package requires only net-tools.x86_64 installation.

So, we execute yum install net-tools.x86_64

After installation, the Ifconfig command can be executed normally. Because of the IP sensitive information, omitted.

Also, look at the/sbin directory, and the Ifconfig file appears.

3. Summary

Centos 7 installs the Ifconfig Management command, which is installed through Yum and runs Yum install net-tools.x86_64.

Centos 7 Installation ifconfig management commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.