How to set static ip address in ubuntu and Centos using terminal

How to set static ip address in ubuntu 16.04

How to set static ip address in any linux distros using terminal

Open terminal

nmtui

Edit a connection

 

Select the connection you want to edit and select the edit option as mentioned in image

 

DropDown and select manual option in ipv4



Show options

Edit the ip, gateway, and DNS

DropDown and press ok

Go back to terminal

Again open

nmtui

Select “ Activate a connection “

Select your connection and press enter

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.