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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-07-2007, 04:35 PM
|
#1
|
Member
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214
Rep:
|
how to assign a host name?
My prompt says:
root@none:~ #
I assume "none" is my host name. How do I change that? Thanks
|
|
|
11-07-2007, 04:43 PM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
You can edit /etc/hostname (or /etc/HOSTNAME) and add something like
Sometimes setting up the hostname is done in /etc/sysconfig/network (or /etc/sysconfig/networking) e.g.
Code:
HOSTNAME="mybox.mydomain.com"
|
|
|
11-07-2007, 04:58 PM
|
#3
|
Member
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214
Original Poster
Rep:
|
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?
|
|
|
11-07-2007, 05:11 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
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.
|
|
|
11-07-2007, 05:12 PM
|
#5
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Did you restart the network service?
|
|
|
11-07-2007, 05:35 PM
|
#6
|
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:
|
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.
|
|
|
11-07-2007, 06:02 PM
|
#7
|
Member
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214
Original Poster
Rep:
|
Quote:
Originally Posted by billymayday
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...
|
|
|
11-07-2007, 06:03 PM
|
#8
|
Member
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214
Original Poster
Rep:
|
Quote:
Originally Posted by bskrakes
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.
|
|
|
11-07-2007, 06:07 PM
|
#9
|
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:
|
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.
|
|
|
11-07-2007, 06:07 PM
|
#10
|
Member
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214
Original Poster
Rep:
|
Quote:
Originally Posted by reddazz
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.
|
|
|
All times are GMT -5. The time now is 09:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|