Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Commands»Bash ifconfig: command not found on CentOS/RHEL 7

    Bash ifconfig: command not found on CentOS/RHEL 7

    RahulBy RahulJanuary 10, 20152 Mins ReadUpdated:July 15, 2021

    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.

    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
    Previous ArticleHow to Block Ping (ICMP) Responses in Linux System
    Next Article How to Install Adobe Flash Player 32 on Ubuntu 18.04 & 16.04

    Related Posts

    How to Search Recently Modified Files in Linux

    2 Mins Read

    Bash Printf Command

    Updated:December 23, 20212 Mins Read

    Tee Command in Linux with Examples

    4 Mins Read

    How to Scan Open Ports with Nmap

    5 Mins Read

    Handling filenames with spaces in Linux

    3 Mins Read

    How To Compare Two Files in Linux

    Updated:August 23, 20215 Mins Read

    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

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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