Distributed Information System (DIS)
  • Home
  • The blog
  • Contact

hostname and hostname --fqdn mystery

2/10/2013

0 Comments

 
I have just installed a fresh Ubuntu 12.04 LTS server named home. Why not. Preparing the installation of PHP with fastcgi and nginx, inspired by this tutorial, I was puzzled by the fact I get home with the commands hostname and hostname -f.

I'm expected to receive the fully qualified domain name when using the hostname -f command.

It takes some time and manual page reading to find out that this result is normal. Indeed the /etc/hostname file must contain the server name, and not the fully qualified domain name.

The right command to use to get the fully qualified domain names is
hostname --all-fqdns and not hostname -f. There is no need to change the /etc/hosts file. It should contain
127.0.0.1       localhost
127.0.1.1       home
This 127.0.1.1 is weird, but it was set so by default.
0 Comments

    Author

    Christophe Meessen is a  computer science engineer working in France.

    Any suggestions to make DIS more useful ? Tell me by using the contact page.

    Categories

    All
    Business Model
    Database
    Dis
    Ditp
    Dvcs
    Git
    Gob
    Idr
    Misc
    Murphys Law
    Programming Language
    Progress Status
    Startup
    Suggested Reading
    Web Site

    Archives

    December 2017
    November 2015
    September 2015
    February 2013
    December 2012
    November 2012
    May 2012
    February 2012
    March 2010
    October 2009
    September 2009
    July 2009
    June 2009
    May 2009
    February 2009
    January 2009
    November 2008
    September 2008
    August 2008
    July 2008
    May 2008
    April 2008
    March 2008
    February 2008
    January 2008
    December 2007
    October 2007
    August 2007
    July 2007
    June 2007
    May 2007

    RSS Feed

    Live traffic feed
    You have no departures or arrivals yet. Wait a few minutes and check again.
    Powered by FEEDJIT
Powered by Create your own unique website with customizable templates.