Host name change on openSUSE 12.1

What’s the right way to change your hostname? The command hostname is an easy way but is it enough? Is it safe to edit /etc/HOSTNAME? Or do you have to do it through YaST? the command hostname in my case reports “linux-7vld.site” but when I navigate to Network Services, Hostnames, I see a table with 3 coulnns: IP Address, Hostnames and Aliases. Unfortunately none of the hostname matches mine. BTW, I am not in a network with other computers, so my guess is I don’t need that…

  • pascal

On 28/03/12 20:46, pligdas wrote:
>
> What’s the right way to change your hostname? The command hostname is an
> easy way but is it enough? Is it safe to edit /etc/HOSTNAME? Or do you
> have to do it through YaST? the command hostname in my case reports
> “linux-7vld.site” but when I navigate to Network Services, Hostnames, I
> see a table with 3 coulnns: IP Address, Hostnames and Aliases.
> Unfortunately none of the hostname matches mine. BTW, I am not in a
> network with other computers, so my guess is I don’t need that…
>
> - pascal
>
>

Is it safe to edit /etc/HOSTNAME?
Yes

linux-7vld.site > eg > mybox-suse.site

Thanks!

  • pascal

IMO probably the question to the point is likely what you’re trying to accomplish.

AFAIK /etc/HOSTNAME is only for local appearances on the machine… More commonly, people want to change or control the machine’s name seen through the network and i that is set in /etc/hosts.

HTH,
TS

YaST > Network devices > Network Configuration and then the Hostname/DNS tab.

YaST will care for all the places involved.

Thanks, I found it under YaST > Network Devices > Network Settings, then Hostname/DNS tab. It was the same as the edited HOSTNAME. The DNS field was empty of course, as I don’t have a statis IP address. I was interested for the local appearance only.

  • pascal

I was interested for local apperances.

  • pascal