How to add the IP address in Ubuntu using command?

Sometimes you may require to add the IP Address manually in ubuntu network Interface. Following are the steps to perform in order to add the IP Address manually in Ubuntu.

  1. Login to Ubuntu server via ssh.

  2. Hit the Following Command.

    # nano /etc/network/interfaces
  1. Enter the interface alias eth0:0 as mentioned in below screen-shot. (Note: If you already have interface alias eth0:0, you can add eth0:1 or eth0:2 for additional IP Address)

    #secondary ip address
    auto eth0:0
    iface eth0:0 inet static
    address 1*3.2*8.149.***
    netmask 255.255.255.***

 

  1. Below Command will up the added interface alias within the network.

    # ifconfig eth0:0 1*3.2*8.149.*** up
  1. Restart the network service.

    # /etc/init.d/networking restart
  1. check the newly added IP Address with the below command.

    # ifconfig

That's it. You are done with adding IP Address on Ubuntu server.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Is HTML5 Supported in Your Servers?

Since HTML content has nothing to do with the web server, there are no special requirements...

How to deploy Mean.js application to VPS?

Upload Mean.js Files via SFTP In FileZilla Once your mean.js webcontent is ready, you need to...

How to install IonCube Loader on CentOS 7 Manually?

Ioncube is a PHP module which protects the PHP application's source code from being viewed from...

How to Install SHOUTCast Radio Server on Linux VPS?

This tutorial will assist you to install SHOUTcast Distributed Network Audio Server (DNAS 2.0) in...

Do You Provide GUI With VPS or Just a Command Line?

Yes, we do provide GUI environment with all our Windows VPS plans. However, in Linux VPS, you...