Hi,
I use imx6quad processor.
I need to change hostname and domain name.
The device connects to the network via DHCP and I installed:
- dhcpcd
- avahi-daemon
I modificed the /etc/hostname file to change my hostname (eg. test).
In the /etc/resolv.conf file the DHCP places "domain mydomain"
and in the /etc/host I write "ip_address test.mydomain test"
The command "ping test.mydomain" doesn't work but "ping test.mydomain" it's work.
How can reached the device with test.mydomain?
You can use "search" option of resolv.conf file for the system to lookup hosts in the domain:
root@imx8mqevk:~# echo search domain.com >> /etc/resolv.conf
Also please note that if will take effect for hosts of this domain (like host.domain.com) not for domain name itself.
I mean adding domain.com info resolv.conf file allows to type "host" instead of "host.domain.com".
And also please pay attention to /etc/hosts file. You can add some high-usage names there.