View Full Version : Renaming computer
Odyssey
12th November 2008, 17:39
Just installed Ubuntu 8.04 on a new computer with a 160GB hdd and in the setup thought that I had named the compter
U8.04-160GB
but in the terminal window, it shows as
U8
Did the period terminate the name?
I want to rename it and assuming that the above answer is yes, to
U804-160GB
or if the hyphen is also going to cause a problem, then
U804160GB
How does one rename their computer?
silver
12th November 2008, 18:24
one way that should work
hostname U804160GB
(as root)
Gina
12th November 2008, 18:26
Hyphens/dashes are OK but I don't think you can used dots. sudo gedit /etc/hostnameJust checked and changed mine from P4-Intrepid to P4-810
Odyssey
12th November 2008, 21:08
I opened a terminal and used:
sudo hostname U804160GB
and nothing changed,
then used:
sudo gedit /etc/hostname
which opened a text editor with U8 as text in it, which I changed to U804160GB
and saved it, then opened a terminal window and still U8.
Am I missing something basic? Do I need to restart (shades of Windoze)?
Odyssey
12th November 2008, 22:48
Restarting did the trick! Thanks to both of you.
robert
Odyssey
16th November 2008, 21:59
Not the end of the story it seems.
I ran the shell command:
sudo lshw
on the computer that I recently renamed and got the message:
Unable to resolve host.
What's that all about?
Gina
16th November 2008, 22:29
Strange - I renamed this P4 Ubuntu 810 system and everything still works fine. You could ask on Ubuntu Forums. All I can think of is to check the Hosts tab in the network settings.
silver
17th November 2008, 17:31
the hostname of the box should typically resolve to an IP address - in /etc/hosts - suprised sudo wants to check that but it might be a security thing I guess
mine has at the top
127.0.0.1 localhost.localdomain localhost
172.25.99.204 computer_name
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.