HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Hostname problems Ubuntu 6.06 setup (http://www.howtoforge.com/forums/showthread.php?t=4858)

badgerbox76 12th June 2006 23:47

Hostname problems Ubuntu 6.06 setup
 
My host file
192.168.0.105 monitorwaves.no-ip.org admin-server
127.0.0.1 localhost admin-desktop

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes

root@admin-desktop:/home/admin# hostname
admin-desktop
root@admin-desktop:/home/admin# hostname -f
localhost
root@admin-desktop:/home/admin#

It should be coming out as admin-server and then monitorwaves.no-ip.org right?

EvanCarroll 13th June 2006 08:59

Quote:

Originally Posted by badgerbox76
My host file
192.168.0.105 monitorwaves.no-ip.org admin-server
127.0.0.1 localhost admin-desktop

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes

root@admin-desktop:/home/admin# hostname
admin-desktop
root@admin-desktop:/home/admin# hostname -f
localhost
root@admin-desktop:/home/admin#

It should be coming out as admin-server and then monitorwaves.no-ip.org right?

The "hostname" doesn't come from the file "hosts" it comes from the file /etc/hostname, which must resolve to something with the resolver.
So in your case make /etc/hostname read "admin-desktop", and run
Code:

hostname -F /etc/hostname
then your
Code:

hostname -f
will work


All times are GMT +2. The time now is 22:36.

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