hostname and hostname -f not same value

Discussion in 'General' started by mtuser, Mar 11, 2013.

  1. mtuser

    mtuser New Member

    following this guide

    hostname =
    hostname -f =

    but after reboot it's changed to

    hostname = ns1
    hostname -f =

    is it correct?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this a vserver with e.g. openvz?
  3. Parsec

    Parsec New Member

    It's the correct procedure. hostname -f, the -f means the fully qualified domain name of the server. Without the -f you just get the hostname, which is the name of the server (without the domain name).
  4. mtuser

    mtuser New Member

    One debian 6 64bit it's same value.
    but one in debian 32bit VPS (Openvz) it's not same.
  5. Parsec

    Parsec New Member

    Most probably depends on what you typed when asked originally. What is stored in /etc/hostname and initiated at boot by /etc/init.d/

    Take a look in those files and also view the manual for hostname (man hostname) and you will understand how it works.

Share This Page