LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2010, 03:00 PM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 33
hostname: Unknown host


I changed my hostname with the hostname command and check it in /etc/hostname. It is all correct. The name is set. After that I restarted the script
Code:
/etc/init.d/hostname.sh start
The problem is that on my next login when I type
hostname -s or
hostname -a

hostname: Unknown host

appear. What am I missing? I use Debian 5.05
 
Old 08-07-2010, 03:20 PM   #2
rsciw
Member
 
Registered: Jan 2009
Location: Essex (UK)
Distribution: Home: Debian/Ubuntu, Work: Ubuntu
Posts: 206

Rep: Reputation: 44
What's the output of
cat /etc/hosts
cat /etc/hostname
 
Old 08-07-2010, 03:23 PM   #3
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
here is the output
Code:
kodeserver:~# cat /etc/hosts
127.0.0.1       localhost
xxx.xx.xx.xxx    kodeserver.kdelchev.com kodeserver

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
kodeserver:~# cat /etc/hostname
kodeserver

Last edited by konzo; 08-07-2010 at 03:41 PM.
 
Old 08-07-2010, 03:38 PM   #4
rsciw
Member
 
Registered: Jan 2009
Location: Essex (UK)
Distribution: Home: Debian/Ubuntu, Work: Ubuntu
Posts: 206

Rep: Reputation: 44
Some folks on the net suggest to add a FQDN to /etc/hosts

try adding
localhost.lan or something similar next to localhost and see what happens.

Otherwise I'm at a loss too, hasn't happened to me yet
 
Old 08-07-2010, 03:43 PM   #5
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
Seems the restarting solve the problem. (win experience matters )
now telnet localhost 25 shows the new host and domain name.

Thank you for the quick reply.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9 ,host does reslove a dns name but ping says unknown host Byenary Linux - Networking 10 01-12-2011 02:33 AM
[SOLVED] hostname: Unknown host peterpan303 Linux - Newbie 4 11-11-2010 03:30 PM
Hostname: Unknown Host ?? I'm very confused Rampage2884 Linux - Networking 12 11-10-2010 08:18 AM
startx fail , error shown "hostname: Unknown host " syseeker Red Hat 4 07-05-2006 12:40 PM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 02:24 PM


All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration