Linux problem with Computer name

Questions and Answers : Unix/Linux : Linux problem with Computer name
Message board moderation

To post messages, you must log in.

AuthorMessage
Max65

Send message
Joined: 13 Jan 06
Posts: 8
Credit: 738
RAC: 0
United States
Message 238887 - Posted: 28 Jan 2006, 18:18:53 UTC
Last modified: 28 Jan 2006, 18:30:28 UTC

new to linux
When i show computers my BOINC account my Linux computer name shows "localhost.localdomain" for it's name.

However when i show the XP machine the computer name GPS-1 is showen ok.

is there some way to show what the computer says it's name is ?
thanks for any help on this problem
ID: 238887 · Report as offensive
Dotsch
Volunteer tester
Avatar

Send message
Joined: 9 Jun 99
Posts: 2422
Credit: 919,393
RAC: 0
Germany
Message 238949 - Posted: 28 Jan 2006, 20:00:45 UTC
Last modified: 28 Jan 2006, 20:01:33 UTC

You have got to setup a hostname for your system. Please look into this thread : http://setiathome.berkeley.edu/forum_thread.php?id=343

So far I know, the method of setting a ip address and a hostname differs on the used linux distro.
ID: 238949 · Report as offensive
Max65

Send message
Joined: 13 Jan 06
Posts: 8
Credit: 738
RAC: 0
United States
Message 239470 - Posted: 29 Jan 2006, 20:30:36 UTC
Last modified: 29 Jan 2006, 20:36:15 UTC

Here is a little more history on the system i am using
linux Ubuntu ver. 5.10

the original HOSTS file was as follows and showed computer name as localhost.localdomain
_________________________________________
127.0.0.1 localhost.localdomain COMPUTER2
__________________________________________


I changed the original HOSTS file to the following and all works ok and the computer name shows as COMPUTER2.
_________________________________________


127.0.0.1 localhost
165.2.10.2 COMPUTER2

_________________________________________

However i am using DHCP and don't always have a static IP.
Is there a way i can change the HOSTS file so i can use DHCP with a changing IP address ?

Thanks Dotsch for the URL it helps alittle
kent

ID: 239470 · Report as offensive
Dotsch
Volunteer tester
Avatar

Send message
Joined: 9 Jun 99
Posts: 2422
Credit: 919,393
RAC: 0
Germany
Message 239756 - Posted: 30 Jan 2006, 8:38:16 UTC - in response to Message 239470.  
Last modified: 30 Jan 2006, 8:40:46 UTC

However i am using DHCP and don't always have a static IP.
Is there a way i can change the HOSTS file so i can use DHCP with a changing IP address ?

Yes. Some posible solutions :

- You can configure your DHCP server that is host everytime gets the same IP.
- Configure a DNS server and setup your host, that it uses the DNS. So your IP and hostname will differ, but the name will always resolved.
- Make a skript, which starts at the boot after the dhcp client, which reads out the IP from the interface and configure your hostname in the /etc/hosts
- Make a virtual interface with a IP in a unused range, and confgiure your hostname and IP on this virtual IP in the /etc/hosts




ID: 239756 · Report as offensive

Questions and Answers : Unix/Linux : Linux problem with Computer name


 
©2025 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.