Change hostname in opensuse Leap

Windows Articles

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

Let me tell you how to change to the hostname in OpenSUSE Leap test machine. I was fighting the last two days before this working method, this method should work on Suse Server 12,  OpenSUSE 42.x and Opensuse 15.

My server:

suse15:~ # uname -a
Linux suse15 4.12.14-lp150.8-default #1 SMP Sat Apr 7 05:12:52 UTC 2018 (8719fc4) x86_64 x86_64 x86_64 GNU/Linux

IP: 192.168.65.151
Hostname:  suse15
Domain name:  osradar.com.

The actual info:

Change hostname procedure :

The procedure to change the computer hostname on openSuse Linux:

Type the following command to edit /etc/hostname using your preferred text editor:
sudo vi /etc/hostname
Delete the existing name and put a new name.
Now Edit the /etc/hosts file:
vi /etc/hosts
Replace any name related to the existing computer name with your new one.


Reboot the system to changes take effect
sudo reboot

Using hostingctl command

hostingctl is   a command from where you can change  the hostname  also  with the following commands:

hostnamectl set-hostname  suse15

Using  Yast2

Yast2 us  GUI tool  to  manage your  server/desktop

Start Yast2 with
# sudo yast2

 

Then NetworkServices > Hostnames > and  change hostname related to your  IP address

Restart rcnetwork services.

osradar@suse15~> sudo rcnetwork restart

How to verify? 

Please reboot for the final check and enjoy

More articles

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...
x