Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»Bash ifconfig: command not found in Ubuntu & Debian

    Bash ifconfig: command not found in Ubuntu & Debian

    By RahulJuly 15, 20212 Mins Read

    The ifconfig command is a useful utility to display and set network configuration on Ubuntu and Debian Linux systems. This command is available under the net-tools package is replaced with modern iproute2 Debian packages.

    Advertisement

    When your type ifconfig command on the latest operating systems, you will get the following error on Ubuntu and Debian-based systems.

    -bash: ifconfig: command not found

    ifconfig command not found

    Install net-tools Package

    The ifconfig binary file comes with the net-tools Debian package. Install this package using the following command which is available under default repositories.

    sudo apt-get install net-tools 
    

    Using ifconfig

    Then you can use this command to check network configuration details. The below command will show details for all interfaces configured on your Debian system.

    ifconfig 
    
    Output:
    eth0: flags=4163 mtu 1500 inet 206.81.1.33 netmask 255.255.240.0 broadcast 206.81.15.255 inet6 fe80::6cdc:96ff:fe05:82a8 prefixlen 64 scopeid 0x20 ether 6e:dc:96:05:82:a8 txqueuelen 1000 (Ethernet) RX packets 43032855 bytes 6789955172 (6.7 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 38997280 bytes 38954070507 (38.9 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth1: flags=4163 mtu 1500 inet 10.136.0.2 netmask 255.255.0.0 broadcast 10.136.255.255 inet6 fe80::14d4:5eff:fe05:e5ed prefixlen 64 scopeid 0x20 ether 16:d4:5e:05:e5:ed txqueuelen 1000 (Ethernet) RX packets 311 bytes 21770 (21.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 327 bytes 22986 (22.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 700780899 bytes 2751296590452 (2.7 TB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 700780899 bytes 2751296590452 (2.7 TB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    Use below command to show details for interface eth0 in system

    ifconfig eth0 
    

    To get all interfaces details using ifconfig use the following command.

    ifconfig -a 
    

    Conclusion

    This tutorial helped you to resolve -bash: ifconfig: command not found error on an Ubuntu and other Debian-based systems.

    command debian ifconfig
    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)

    Understanding 2>&1 in Bash: A Beginner’s Guide

    View 4 Comments

    4 Comments

    1. Anna on June 6, 2019 1:26 pm

      Thanks for the great answer!

      Reply
    2. Liam on December 12, 2018 6:25 am

      It’s a great utility to get network configuration details on Debian Linux system.

      Reply
    3. preter on November 20, 2018 9:55 am

      The ifconfig command was not installed default with Debian, because of net-tools has been obsolete by iproute2 in 2009: https://lists.debian.org/debian-devel/2009/03/msg00780.html
      You should to use default iproute2, not install old, not development and security risk net-tools.

      Poor article, do not learn people how to use old and security risk tools.

      Reply
      • Rio on November 17, 2020 10:32 pm

        TY Preter you are correct. 5 thumbs up

        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.