LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-07-2007, 04:35 PM   #1
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 41
how to assign a host name?


My prompt says:
root@none:~ #

I assume "none" is my host name. How do I change that? Thanks
 
Old 11-07-2007, 04:43 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can edit /etc/hostname (or /etc/HOSTNAME) and add something like
Code:
myhost.mydomain
Sometimes setting up the hostname is done in /etc/sysconfig/network (or /etc/sysconfig/networking) e.g.
Code:
HOSTNAME="mybox.mydomain.com"
 
Old 11-07-2007, 04:58 PM   #3
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
my etc/hostname file contained the text "none" so I edited it and changed it to "dallas". However, my prompt is still the same:
root@none:/etc #

Any idea why "none" still shows up in the prompt?
 
Old 11-07-2007, 05:11 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Did you reboot the system when you made the changes?. By the way, what distribution are you using and can you please put it in your profile. This will help you get responses and answers that are relevent to your distribution.
 
Old 11-07-2007, 05:12 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Did you restart the network service?
 
Old 11-07-2007, 05:35 PM   #6
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
If you are looking for the real easy way and don't know how to access the command line go to System at the top of your GUI and go to Administration, look for Network. There will be five tabs (depending on your Distro it could be a little different) and locate the one that says DNS and enter your host name. The tab next to that one should be called Host Name, select it and enter in your ip address as 127.0.0.1 (unless you set your machine with a static IP), enter the same host name as you did on the DNS tab and then enter the aliases localhost. You will now need to click back to the main/first tab and click activate. It will go through a short process. Once that process is finished re-start your machine. You don't have to reboot the system if you know how to restart the system VIA the GUI but I would recommend a reboot.
 
Old 11-07-2007, 06:02 PM   #7
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by billymayday View Post
Did you restart the network service?
No. How do I do that?

I looked up man ifconfig, but I think I'm off track with that...
 
Old 11-07-2007, 06:03 PM   #8
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by bskrakes View Post
If you are looking for the real easy way and don't know how to access the command line go to System at the top of your GUI ...
I don't have a GUI. I have Ubuntu 7.10 server installed at Linode.com. I'm connected via SSH.
 
Old 11-07-2007, 06:07 PM   #9
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
to restart the network service on Ubunu try (at the command line)

BEFORE YOU PROCEED:
this will drop your connection, you will have to reconnect.

as the root user do type this:
/etc/init.d/networking restart

found it at this link. http://ubuntuforums.org/showthread.php?t=303681

Last edited by bskrakes; 11-07-2007 at 06:08 PM.
 
Old 11-07-2007, 06:07 PM   #10
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by reddazz View Post
Did you reboot the system when you made the changes?. By the way, what distribution are you using and can you please put it in your profile. This will help you get responses and answers that are relevent to your distribution.
Rebooting solved it. I also updated my profile. Thanks.
 
  


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
Required to achieve host to host communication via USB file transfer cable may1284 Linux - General 1 03-14-2007 05:02 PM
debian host as a mass storage device to another host? elfoozo Debian 4 03-05-2007 06:06 PM
host-to-host USB cable: how to make it work under debian?? stefan_578 Linux - Hardware 18 12-20-2006 03:09 PM
Resolving <www.some remote host>.... failed: Host not found. koodoo Linux - Newbie 2 06-27-2005 09:48 AM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:33 AM.

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
Open Source Consulting | Domain Registration