How to set a static IP Address on Ubuntu Server

How to set a static IP Address on Ubuntu Server

I’m going to set a static IP address on my Ubuntu LTS server.

Login into the server’s console and edit the settings for your primary network interface in /etc/network/interfaces:

sudo nano /etc/network/interfaces

# The primary network interface
auto eth0
iface eth0 inet static
       address 10.0.0.10
       netmask 255.255.255.0
       network 10.0.0.0
       broadcast 10.0.0.255
       gateway 10.0.0.1
       # dns-* options are implemented by the resolvconf package, if installed
       dns-nameservers 10.0.0.1
       dns-search nathanmino.com

 

Save the file and then restart your network services:

sudo /etc/init.d/networking restart

 

2 Responses to How to set a static IP Address on Ubuntu Server



© Copyright Nathan Mino 2021. All rights reserved.
Use of this web site constitutes acceptance of the nathanmino.com Terms Of Use and Privacy Policy
Remote Support