15 Useful “ifconfig” Commands to Configure Network Interface in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Hosting referral link if you planning to start your blog ($3.82/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

20 Responses

  1. TAHZEEBURRAHMAN says:

    What is netmask and broadcast, And what is use of this.

    • Ravi Saive says:

      @Tahzeeb,

      A netmask is a 32-bit mask used to separate an IP address into subnets and specify the network’s available hosts, whereas broadcasting refers to transmitting a packet that will be received by each device in the network.

  2. swati sharma says:

    The network commands defines numerous tools, which can be helpful when networking with further computer systems inside both the network & cross ways the Internet, attaining additional detail about further computer systems.

  3. Ikkin says:

    Can you tell me how to presist ifconfig changes after reboot? I am trying to change broadcast and netmask with ifconfig. It changes successfully but after reboot it revert back to previous settings.

    Thanks in Advance,
    Nikkishah

    • Ravi Saive says:

      @Nikki,
      How you changing the network settings? directly on the command line? if yes, then settings will be for temporary only. Better add the settings in ifcfg file under network-scripts directory, if you are using Centos distro..

  4. mike says:

    I have two interfaces and after ifconfig command, two interfaces show same inet address (this probably i guess I made forwarding command in iptables in firewall ), and interrupt shows read “Interrupt” as shown in example above. I dont know why interrupt is indicated and also I could connect internet. I suspect the fox browser contaminated by some hacks . What to do now, Do I need reinstall fox.

  5. Manolo Baclig says:

    how about editing /etc/sysconfig/network-scripts/***interface-name***

  6. Allan says:

    I can’t reply to some emails because of an IPconfig error message and have to copy the email address into a compose document

  7. hamid says:

    hi

    in my iptables (centos 5) i use ! command

    after install new version of centos6.3 i get error that is deprecated command

    plz help me whats is instead this

  8. mansoor says:

    Download Your Free eBook NOW – A Newbie’s Getting Started Guide to Linux
    I can’t download this, as it asking telephone number belongs to US to download the book, what ever number i give its shows error

  9. test says:

    Hi,
    How to know which is primary interface, if more than one interface is configured?

  10. Anon says:

    Hasn’t ifconfig been deprecated for awhile now?

    • DavidD says:

      It has, in favor of the “ip” command.

    • RoseHosting says:

      yes ‘ifconfig (net-tools)’ has been deprecated for a while now.. There is the drop-in replacement ‘iproute2’.

      however, many systems still have ‘ifconfig’, it is still used by many folks even though ‘ip’ is much more powerful as it nicely manages the networking tasks. It has the functionality of the tools like ‘ifconfig’, ‘iptunel’, ‘route’ etc…

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 257,757
  2. 11,967
  3. 39,682

Are you subscribed?