Almost everybody can figure out how to change their IP address using an interface, but did you know you can set your network card’s IP address using a simple command from the command line?

Changing Your IP From the Command Line in Linux

Note: This will work on all Debian based Linux Distro’s.

To get started type ifconfig into the terminal and hit enter, take note of the name of the interface that you want to change the settings for.


To change the settings, you also use the ifconfig command, this time with a few parameters:

sudo ifconfig eth0 netmask

That’s about all all you need to do to change your IP, of course the above command assumes a few things:

  • The interface that you want to change the IP for is eth0
  • The IP you want to give the interface is
  • The Subnet Mask you want to set for the interface is


If you run ifconfig again you will see that your interface has now taken on the new settings you assigned to it.


If you wondering how to change the Default Gateway, you can use the route command.

sudo route add default gw eth0

Will set your Default Gateway on the eth0 interface to


To see your new setting, you will need to display the routing table.

route -n


That’s all there is to it.

    Categories: How-TECH


    Daryl Yafuso · January 14, 2020 at 7:17 pm

    Very good blog, this article has made me learn a lot, I collected it for future viewing!

    cenforce india · February 28, 2020 at 5:04 pm

    through middle [url=]cenforce india[/url] briefly teaching wide year buy cenforce usa recently
    phone cenforce india nowhere soil

    alcohol abuse · March 10, 2020 at 6:51 am


    Judi Online · March 28, 2020 at 4:46 am

    Stupid Geek Tricks: Change Your IP Address From the Command Line in Linux – Chris Cubilla

    amoxicillin drug · April 19, 2020 at 7:59 pm

    amoxicillin drug

    asthma inhalers for sale online · April 21, 2020 at 2:50 am

    directly cake [url=]asthma inhalers for sale online[/url]
    since sand widely menu generic albuterol inhaler price back bonus asthma inhalers for sale online fast tour

    FetsteecyQuany · May 15, 2020 at 6:26 pm

    cheap clomid online

    Leave a Reply

    Your email address will not be published.

    error: Content is protected !!!