LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training 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-19-2004, 08:13 AM   #1
Mr60s
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Rep: Reputation: 0
Question Changing the terminal string.


Hello there,

Am new to linux, but I enjoy it more & more every day.
My question regarding the terminal, I was wondering how I could change the "localhost" part to someting else.

Exampel: I want this; [root@localhost /]# to become this; [root@Astring /]#

Any help would be grate, thanks!
 
Old 04-19-2004, 08:29 AM   #2
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Rep: Reputation: 30
Localhost is set because you have not defined a hostname I guess.

You can change the prompt in the ~/.bashrc file (if using bash):
if [ "$PS1" ]; then
# set a fancy prompt
PS1='\u@\h:\w\$ '
fi

Check 'man bash' for more information and use the '/' button to search.
 
Old 04-19-2004, 08:52 AM   #3
Mr60s
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your time, that did work very well.
However I was looking for a global affect, something the would affect all the users, without me going around changing every ~/.bashrc files.
Any ideas?
 
Old 04-19-2004, 10:21 AM   #4
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Rep: Reputation: 30
Do the same thing in /etc/profile :-)
 
Old 04-20-2004, 05:32 AM   #5
Mr60s
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks alot, now it works like charm
 
  


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
Changing terminal colors Athos Debian 3 09-11-2007 06:54 PM
script for changing a specific string in a directory irfanhab Programming 5 06-28-2005 02:27 PM
Changing terminal font size rose_bud4201 Linux - General 4 05-26-2005 09:17 AM
Perl : Changing a single char in a string richhill Programming 2 09-17-2003 05:31 PM
changing Background in Terminal, but how ? emin Linux - Distributions 7 11-13-2002 03:39 AM


All times are GMT -5. The time now is 02:25 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