Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-24-2003, 01:03 PM   #1
LQ Newbie
Registered: Apr 2003
Posts: 9

Rep: Reputation: 0
Changing local host name

I did my first linux install last week, and made a mistake - I accidentally let the install choose a default name for the machine! Now my brand spanking new laptop doesn't match the naming convention I have with the rest of my machines. Which is such a disaster.

So I have two questions. The first is: How do I change the name of my machine for networking, etc?

The second (somewhat unrelated) is: How can I change what the command prompt displays? (Currently: $USER@localhost or $USER@dhcp32-47) Is this configurable? (I assume so, everything else is)

Thanks very much
Old 04-24-2003, 01:22 PM   #2
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
You didn't mention your distro, so my answer may be vague and confusing. Distros have different tools for configuring networks and such and I can't read minds yet.

The two files that need changing are /etc/hostname which should contain one line with your hostname, and /etc/hosts for your networking. Here are mine for your perusal.
# Redhat 7.3 Celeron 850 box tinwhistle /etc/hosts file
# Do not remove the following line, or various programs
# that require network functionality will fail.	tinwhistle	localhost.localdomain	localhost	bones	tinwhistle	uilleann
The bash prompt is certainly customizable.

From a great resourse, the good old Google search hits

Last edited by fancypiper; 04-24-2003 at 01:28 PM.


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
How can i change my local host? Jose Santos Linux - Newbie 1 05-26-2005 05:15 AM
Local Host? mac_casey Linux - General 7 03-02-2005 09:04 AM
local host login ? reecedeg Red Hat 5 08-10-2004 07:17 AM
can't log onto the local host anje Mandriva 1 03-25-2004 11:02 PM
Local Host Webpage littlebradley Linux - Software 4 05-09-2003 09:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:39 AM.

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