# login hostname@unknown_domain systemd

## EasterParade

I recently set up a new system for a friend. She wanted systemd. 

My own Gentoo gets started by OpenRC. I am new to systemd.

Everything seems to be just fine with the exception of the login

which does not show the domain "localhost". I need to set up a 

gui login manager later but before I do that I need to correct this deficit.

I just don´t know how. I followed the wiki for systemd, having enabled

systemd-resolved.service.

Would any of you point me into the right direction, please.

----------

## dr_wulsen

sure enough, there's the gentoo-systemd article, which introduces you to hostnamectl

----------

## EasterParade

 *Quote:*   

> Hostname
> 
> To set the hostname, create/edit /etc/hostname and simply provide the desired hostname.
> 
> When booted using systemd, a tool called hostnamectl exists for editing /etc/hostname and /etc/machine-info. To change the hostname, run:
> ...

 

Surely there is and that´s what I´ve followed but may be I should have hostnamectl set-hostname <hostname>.localhost instead of only <hostname> ?

Or is /etc/machine-info the right place?

----------

## dr_wulsen

The FQDN (fully qualified domain name) consists of two parts: *your hostname and *the domain name returned by the resolver.

So the easiest way is to add/modify your FQDN to /etc/hosts

127.0.0.1 localbox. lan localbox localhost

should do the trick for IPv4.

Sure enogh, you should edit the IPv6 line to read the same names, if you are using IPv6.

----------

