I've set my hostname in etc/hosts, sysconfig/network and by running the hostname command.
Nothing seems to stick after a reboot. This is 64bit running in VMWare workstation.
Can't seem to get hostname to be set.
Re: Can't seem to get hostname to be set.
I think you have to use hostnamectl.
I think if you leave off the --static part you get it without periods, something like myhostmydomaincom
At least this is what I found in Fedora. (Although now I always do it that way, so I don't know if the --static part is still necessary.)
Code: Select all
hostnamectl set-hostname myhost.mydomain.com --static
At least this is what I found in Fedora. (Although now I always do it that way, so I don't know if the --static part is still necessary.)
New users should check the FAQ and Read Me First pages
-
- Posts: 2
- Joined: 2014/10/26 01:29:34
Re: Can't seem to get hostname to be set.
This is what I read in the man for that command; still getting used to systemd and its new commands.
So I think you don't need add any of those switches unless you want to change just that particular one.
Thanks for the help!
Code: Select all
By default, this will alter the pretty,
the static, and the transient hostname alike; however, if one or
more of --static, --transient, --pretty are used, only the selected
hostnames are changed.y
Thanks for the help!