LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-24-2003, 01:03 PM   #1
hagbardc
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
fancypiper
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.
Code:
tinwhistle
Code:
# 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.
127.0.0.1	tinwhistle	localhost.localdomain	localhost
192.168.0.1	bones	
192.168.0.2	tinwhistle	
192.168.0.3	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.
 
  


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
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


All times are GMT -5. The time now is 07:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration