How To Change Hostname On Ubuntu 21.04 Server2 min read
In this tutorial how to change hostname from ubuntu 21.04 server. This is latest release April 22, 2021. Many features include this ubuntu version. Also change logo and background color.
★ How To Setup ZFS Storage Pool On Ubuntu 14.04
★ How To Add Windows Host In Zabbix Server
Step #01: Check server version using below command.
root@ubuntu21:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 21.04
Codename: Hirsute
Must be change cloud.cfg file. Open cloud.cfg file using any editor.
root@ubuntu21:~# vi /etc/cloud/cloud.cfg
Then change false to true. As like below
preserve_hostname: true
Then save press Esc type :wq then press Enter.
Step #02: Open hosts file and edit server ip address and hostname.
root@ubuntu21:~# vi /etc/hosts
as like below
127.0.0.1 localhost 10.66.100.9 Server.technologyrss.local Server
Then save press Esc type :wq then press Enter.
Then again open hostname file and edit your hostname.
root@ubuntu21:~# vi /etc/hostname
As like below
Server
Then save press Esc type :wq then press Enter.
If you want more help needed so please see my YouTube channel. Don’t forget subscribe my channel.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!