Static hostname vs Transient hostname, and how they effect on operation system

next link show how change the hostname
https://www.cyberciti.biz/faq/opensuse-linux-change-hostname-computer-name-command/

when i run this command to show current hostname, find two types of host name:

hostnamectl

next results, show there’s no Static hostname:

Static hostname: n/a
           Transient hostname: localhost
           Icon name: computer-laptop
           Chassis: laptop
           Operating System: openSUSE Leap 15.3
           CPE OS Name: cpe:/o:opensuse:leap:15.3
           Kernel: Linux 5.3.18-150300.59.46-default
           Architecture: x86-64

note:
every thing work good and i do not recive any problem during current situation.

hope help me understand next points:

1- did current situation (no static hostname), effect by some how?
2- did i need set hostname, can i also change the Transient hostname?
3- how set them during installation, if they both important?

thanks in advance

Hi
I normally do it after install (but also use static ip’s and hostnames in /etc/hosts);


hostnamectl --set-transient <some hostname>

Also look at;

domainname --help

You can set via installation in the ‘networking’ setion prior to install.

Phew, I have never made such a fuss about static hostnames. Just edited /etc/hostname with “kdesu kwrite”. Also, I have never bothered about this:

From:
127.0.1.1 localhost
To:
127.0.1.1 ln-sg-vpn1
I don’t know if it is wise to assign a hostname to 127.0.1.1. Here it is “localhost” on all machines. I am using static IP addresses and wicked on all machines except the laptop which I can not access today. On the laptop I am using network manager but still the host is known due to /etc/hosts on all machines. And the Fritz!Box will always assign the same IP address to it. For sure I didn’t mess about 127.0.1.1.

What does

cat /etc/hostname

tell you?
Can you ping that machine using it’s hostname from other boxes?

Hi
As long as 127.0.0.1 is localhost or localhost.localdomain, likewise in the past I’ve added 127.0.0.2 to localhost but never needed to. Now if you want to play with a service on 127.0.0.1, then use nip.io or sslip.io to resolve to localhost on the fly;


ping forums.opensuse.org.127.0.0.1.nip.io

PING forums.opensuse.org.127.0.0.1.nip.io (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.049 ms
....

ping forums.opensuse.org.127.0.0.1.sslip.io

PING forums.opensuse.org.127.0.0.1.sslip.io (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
....

Yes, sure. Sorry! Of course I meant 127.0.0.1!

127.0.0.1    localhost

I have never ever even added 127.0.1.1 to any host list. In a nutshell, I don’t think it is required to do any change to either of both in order to get a static hostname.

Note: Situation may change if transient hostname is used. For consistent naming have a static hostname. I ran “hostnamectl hostname i3-4130” after installation: https://forums.opensuse.org/showthread.php/554703-Testing-a-new-distribution-The-same-procedure-as-everytime

**i3-4130:~ #** hostnamectl 
 Static hostname: i3-4130 
       Icon name: computer-desktop 
         Chassis: desktop 
      Machine ID: b650d066970b487eaffea649babf596a 
         Boot ID: 7ce788372f94404fa05944bbda1c80ea 
Operating System: openSUSE Tumbleweed                 
     CPE OS Name: cpe:/o:opensuse:tumbleweed:20220212 
          Kernel: Linux 5.16.8-1-default 
    Architecture: x86-64 
 Hardware Vendor: To Be Filled By O.E.M. 
  Hardware Model: To Be Filled By O.E.M. 
**i3-4130:~ #**

BTW: Named entity - Wikipedia