openSUSE and SLES will assign a random hostname to the system during installation if not manually set. The random hostname starts with linux- followed by four random alphanumeric characters.
hostname information for openSUSE and SLES is stored in /etc/hostname file as with other Linux systems. You can change the hostname for your SUSE system by editing the /etc/hostname file or by using hostnamectl program at the terminal.
user@linux-ui1m:~> hostname linux-ui1m
hostname is normally displayed in at the shell prompt via \h in the $PS1 environment variable.
user@linux-ui1m:~> sudo hostnamectl set-hostname host [sudo] password for root:
user@linux-ui1m:~> hostname host
The shell prompt is not immediately updated as $PS1 is only set when a new shell is started
user@linux-ui1m:~> bash user@host:~>
Comment anonymously. Login not required.