Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Commands»Bash ifconfig: command not found on CentOS/RHEL 7

    Bash ifconfig: command not found on CentOS/RHEL 7

    By RahulJuly 15, 20212 Mins Read

    ifconfig command is useful for getting details of the network configuration in Linux-based systems. Mostly when I install an older version of Linux operating systems, ifconfig command packages were default installed during installation of the operating system but when recently I installed CentOS 7 operating system, ifconfig command was not installed default with operating system installation.

    Advertisement

    Install Package for ifconfig Command

    ifconfig command comes from net-tools rpm package. Install this package using following command which is available under default repositories.

    yum install net-tools
    

    Getting Interface Information using ifconfig

    Now use ifconfig command to check network configuration details. Below command will show details for all interfaces in system

    [[email protected] ~]# ifconfig 
    
    eth0      Link encap:Ethernet  HWaddr 08:00:27:AC:2D:45
              inet addr:192.168.10.100  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:feae:2545/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:877052 errors:0 dropped:0 overruns:0 frame:0
              TX packets:840432 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1269001025 (1.1 GiB)  TX bytes:61342574 (58.5 MiB)
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    

    Use below command to show details for interface eth0 in system

    ifconfig eth0
    

    To get all interfaces details using ifconfig use following command.

    ifconfig -a
    

    ifconfig ip ipaddr ipconfig network
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    cp Command in Linux (Copy Files Like a Pro)

    dd Command in Linux (Syntax, Options and Use Cases)

    Top 10 JQ Commands Every Linux Developer Should Know

    View 2 Comments

    2 Comments

    1. VenkataNikhil on August 26, 2019 3:41 am

      Hi Bro,

      I have a Question, ” I know the command called “ifconfig” is not installed and i don’t know which package has to be installed to use ifconfig. How to know which package which package that ifconfig includes in centos/RHEL?”

      Thanks in advance.

      Reply
      • Rodeo Clown on September 4, 2019 12:41 pm

        dnf install net-tools

        Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Implementing a Linux Server Security Audit: Best Practices and Tools
    • cp Command in Linux (Copy Files Like a Pro)
    • 15 Practical Examples of dd Command in Linux
    • dd Command in Linux (Syntax, Options and Use Cases)
    • Iptables: Common Firewall Rules and Commands
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.