DNS Server linuxLinux serverNETWORK ADMINISTRATIONS

How to change Hostname on Linux Ubuntu Server easily without restarting server

How To change HOSTNAME on UBUNTU ?

Displaying the Current Hostname Configuration –
To view the running hostname, invoke the hostnamectl command without any argument:
Hostnamectl & hostname –fqdn
We can change Ubuntu Server hostname is a simple process with using few commands . The syntax of the hostnamectl command is as follows:
hostnamectl set-hostname ns2.canopyit.net
hostnamectl set-hostname “CANOPYIT-DNS-SERVER” –pretty
hostnamectl set-hostname ns2.canopyit.net –static
hostnamectl set-hostname ns2.canopyit.net –transient

Checking if its changed or not !
Hostnamectl & hostname –fqdn
I have shown you how to easily change the hostname on an Ubuntu 22.04 installation without restarting the machine.

source

by OM Computer Networking LAB

linux dns server