Tag Archives: resolv.conf

How to set fqdn (fully qualified domain name) on debian system?

let’s assume our desired fqdn is foobar.example.com. Now
$ hostname
should display “foobar”
$ hostname -d
should display “example.com”
$ dnsdomainname
should display “example.com”

$ cat /etc/hosts
should have following 2 lines

127.0.0.1 localhost
127.0.1.1 foobar.example.com foobar