HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   hostname and hostname -f not same value (http://www.howtoforge.com/forums/showthread.php?t=60904)

mtuser 11th March 2013 08:18

hostname and hostname -f not same value
 
following this guide

hostname = ns1.itemalls.com
hostname -f = ns1.itemalls.com

but after reboot it's changed to

hostname = ns1
hostname -f = ns1.itemalls.com

is it correct?

till 11th March 2013 13:40

Is this a vserver with e.g. openvz?

Parsec 11th March 2013 15:46

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).

mtuser 11th March 2013 20:06

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

Parsec 11th March 2013 23:19

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

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


All times are GMT +2. The time now is 13:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.