unix

How do I configure networking from the command line on my Ubuntu server?

Networking can be set up pretty easily from the command line.

vi /etc/network/interfaces

# The primary network interface

auto eth0
iface eth0 inet static
address 192.168.1.50
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

After entering in all of the networking information, you need to restart networking services using the following command:

sudo /etc/init.d/networking restart

Click to comment

Leave a Reply

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

To Top