How to Change Hostname in CentOS 8

Posted on

How to Change Hostname in CentOS 8. A hostname is a label that identifies a machine on a network. In CentOS 8, you can change a hostname or computer name using nmtui or nmcli.

Changing hostname using nmtui command is pretty simple. But, make sure you are logged in as a user with sudo privileges.

Run this command

sudo nmtui-hostname

Then just simply change the hostname.

Or,the second option is using nmcli.Type this command

sudo nmcli general hostname linuxsec

Ok. So, that’s for today. Ask me everything if you have any problem with this tutorial. And dont forget to share it if you think it is helpful. Thank you and see you in the next tutorial.


Gravatar Image
Budak korporat yang hobi nulis. Pengguna Kali Linux sebagai daily driver. Kadang nonton anime di waktu luang.

Leave a Reply

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