Hello Linux Geeksters. In this quick guide I will show you how to easily change the hostname on OpenSUSE, and apply the changes without restarting the system.
First, we have to temporary change of hostname:
$ sudo hostname NewHostname
To apply the changes, we reload the shell (if you are using a different shell, type its name in the terminal):
$ sudo sed -i 's/OldHostname/NewHostname/g' /etc/HOSTNAME
In the below screenshot, I have replaced the hostname linux-kb3c with the hostname linuxg (the grep commands in the screenshot are just to display the changes, before and after the sed one-liners)