Skip to end of metadata
Go to start of metadata

nmtui-hostname is useful command in CentOS 8 which promt you to enter your machine hostname and press OK to finish.

Please take a look following example

# nmtui-hostname