View previous topic :: View next topic |
Author |
Message |
ROGA Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/4178535825c2f4ebbe1415.jpg)
Joined: 17 Feb 2018 Posts: 156 Location: Zurich, Switzerland
|
Posted: Mon Oct 03, 2022 10:51 am Post subject: [SOLVED] Fqdn |
|
|
Hi,
I'm having problems to set the fqdn to my linux host. I'm a little bit confused, because earlier this was no problem for me. I recently build my new gentoo linux and when I was finished, I noticed that my box did not have a fqdn. Only hostname is working. I tried to set fqdn on traditionelly way in /etc/hosts
Code: |
127.0.0.1 myhost.mydomain.local myhost localhost
|
and also set the hostname with
Code: |
hostnamectl set-hostname myhost
|
but on the console login the greeting-message says: This is myhost.unknown_domain (Linux x86_64 5.15.69-gentoo) 12:34:45
A query with hostname gave following
Code: |
gentoo ~# hostname -s
gentoo ~# myhost
gentoo ~#
gentoo ~# hostname -f
gentoo ~# myhost
gentoo ~#
gentoo ~# hostname -d
gentoo ~#
|
Can anybody tell me, how I have to correctly set the fqdn for my gentoo-box?
thank you for advising _________________ regards,
Roland
Last edited by ROGA on Tue Oct 04, 2022 4:47 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3875
|
Posted: Mon Oct 03, 2022 5:08 pm Post subject: |
|
|
Plz set it thus
Code: |
hostnamectl set-hostname myhostname.mydomain.dom
|
_________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ROGA Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/4178535825c2f4ebbe1415.jpg)
Joined: 17 Feb 2018 Posts: 156 Location: Zurich, Switzerland
|
Posted: Tue Oct 04, 2022 3:47 am Post subject: |
|
|
@alamahant:
Great! It seems to work!
Now hostname returns all value correct
fqdn
Code: | linux ~# hostname -f
linux ~# myhost.mydomain.local |
and shortname
Code: | linux ~# hostname -s
linux ~# myhost |
and domainname
Code: | linux ~# hostname -d
linux ~# mydomain.local |
but one thing is a bit weird. On the local console the greeting-message now says: This is myhost.mydomain.local.mydomain.local (Linux x86_64 5.15.89-gentoo) 06:43:23
I fixed it while I changed the following in /etc/issue
Code: |
This is \n.\O (\s \m \r) \t
|
to
Code: |
This is \n (\s \m \r) \t
|
and all seems to be fine
Thank you for this great and usefull hint. (I mark this thread as solved) _________________ regards,
Roland |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|