How to add a static IP in Ubuntu

To add static IP address to your server first you need to log into your server with root privileges. By default Ubuntu server sets the interface to use DHCP. To assign a static IP you need to edit


Here you will find here something like this:





Edit that file accordingly and replace with your own IP configuration. (If you don’t know your own ISP’s DNS servers you can use Google’s DNS):





Save and exit:


:wq

Reload (start and stop) network:


Ready for a more resilient infrastructure?

Stop settling for slow support and generic security. Get a free, no-obligation Security & Cloud Audit from our Manchester-based engineers.

Ready for a more resilient infrastructure?

Stop settling for slow support and generic security. Get a free, no-obligation Security & Cloud Audit from our Manchester-based engineers.

Ready for a more resilient infrastructure?

Stop settling for slow support and generic security. Get a free, no-obligation Security & Cloud Audit from our Manchester-based engineers.