top of page

Change Linux Hostname and IP Address

Sometimes you might want to change the Linux hostname and IP address assigned to a Linux machine. In this article, we will be looking at Linux hostname and IP address change.

Change Linux Hostname

Check the current hostname on the server


To change the hostname, give new hostname in the single quotes

hostnamectl set-hostname ''

Verify new hostname change


Change Linux IP Address

On a Linux minimal install, you can assign new IP address by editing /etc/sysconfig/network-scripts/ifcfg-eth3 file

vi /etc/sysconfig/network-scripts/ifcfg-eth3

--> change old ip to new ip
--> change old gateway to new gateway ip
--> save and close

Restart the network

service network restart


Related Posts

Heading 2

Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

bottom of page