Ubuntu Networking Configure network interface from CLI


You could use ethtool, but they are not going to be reboot persistent. If you want to achieve this, edit the following file:

sudo vim /etc/network/interfaces

And edit the file with needed informations:

auto <interface_name>
iface <interface_name> inet static
address <ip_address>
netmask <netmask>
network <network>
gateway <gateway>
dns_nameservers <server_1> <server_2> <server_n>
dns_naesearch <server_name>

Then restart interface to make changes running:

sudo ifdown <interface_name> && sudo ifup <interface_name>