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

About these ads

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s