openSUSE
and SLES
will assign random hostname
to the system if not configured. It starts with linux-
followed by 4 randomised characters.
You can change the hostname
for your SUSE
system by using hostnamectl
program at the terminal.
Change system hostname in openSUSE and SLES:
hostname
using hostnamectl
. user@linux-ui1m:~> sudo hostnamectl set-hostname host [sudo] password for root:
hostname
again to confirm. 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:~>
Guide compatibility:
Operating System |
---|
openSUSE Tumbleweed |
openSUSE Leap 15.1 |
openSUSE Leap 15.0 |
SUSE Linux Enterprise Server 15 |
SUSE Linux Enterprise Server 12 |
Comment anonymously. Login not required.