• ifconfig not found in CentOS 7 Minimal Install

    Centos7 ifconfig not found

    If you have installed Centos 7 minimall install ,and want to check the server ip ,you will not found ifconfig command ,you have to install its package via the following command :

    yum -y install net-tools

    Now,you can use ifconfig command :
    View All Network Setting


    View information for all network interfaces

    ifconfig -a

    View network settings for specific interface

    ifconfig enp0s3

    Assign IP address to specific interface

    ifconfig enp0s3

    Assign netmask to network interface

    ifconfig enp0s3  netmask

    Assign IP and netmask to interface

    ifconfig enp0s3 netmask

    Modify macaddress for network interface

    ifconfig eth0 hw ether 00:50:56:82:02:8b

    Enable/Disable network interface

    ifconfig enp0s3 up
    ifup enp0s3
    ifconfig enp0s3 down
    ifdown enp0s3 

    If you don’t want to install additional packages ,and you only want to show the server IP address ,you can use the following command:

    ip addr



    Categories: Linux

    Comments are currently closed.