Ubuntu 20.04 LTS change hostname permanently with CLI
After installing Ubuntu 20.04 Server, I plan to change my hostname permanently from ‘linux-techies’ to ‘ubuntu20-linux-techies.com’.
To change Ubuntu 20.04 LTS hostname permanently we can use command hostnamectl. Before changing hostname let check what is present hostname and how can we change it to new one.
How to check present hostname of Ubuntu 20 Server
Run following command’s:
$ hostname
$ hostnamectl
$ cat /etc/hostname