LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2004, 12:50 AM   #1
pelegk2
LQ Newbie
 
Registered: Sep 2004
Location: Israel the holy land
Posts: 19

Rep: Reputation: 0
changing the "prompt"


i want to change what writen in the console
so when i go into folders i will see :
Quote:
[root@localhost usr/lib]
and not
Quote:
[root@localhost lib]

thnaks in advance
peleg
 
Old 11-24-2004, 12:53 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
its stored in the environment variable PS2 ... read the man page for bash, theres info there to customize it, tho i forget what you need to change to get what you want

edit: read the section "PROMPTING"

Last edited by SciYro; 11-24-2004 at 12:54 AM.
 
Old 11-24-2004, 02:16 AM   #3
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
a quick google would have shown you how to do this.
 
Old 11-24-2004, 02:46 AM   #4
pelegk2
LQ Newbie
 
Registered: Sep 2004
Location: Israel the holy land
Posts: 19

Original Poster
Rep: Reputation: 0
Exclamation for what keywords to look?

i tried but no luck
 
Old 11-24-2004, 03:31 AM   #5
bornhj
Member
 
Registered: Sep 2004
Location: Canberra, Australia
Distribution: Fedora Core 3, Ubuntu Hoary, Slack 10.1
Posts: 120

Rep: Reputation: 15
ok, the variable you need to change is the PS1 variable (in BASH, which i assume you are using).

in your home directory, there should be a file named ".bashrc" (without quotes), remember it is hidden so make sure you are viewing all files (in X) or 'ls -a' at a prompt. if there is already a PS1=something there, change it. otherwise put the following on a new line

in your file write:
Code:
PS1="[\u@\h \w]\$"
i'm pretty certain on this, but not 100%, as i am booted in windows so i can d/l FC3. is there anyone who can back this up?

Last edited by bornhj; 11-24-2004 at 03:33 AM.
 
Old 11-24-2004, 05:12 AM   #6
pelegk2
LQ Newbie
 
Registered: Sep 2004
Location: Israel the holy land
Posts: 19

Original Poster
Rep: Reputation: 0
well first thnaks

second i worked with a vi gui
saved and then opened a new comnsole and it worked
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mambo: changing "Poll" to say "Encuesta" eantoranz Linux - Software 2 03-28-2006 11:35 AM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
Weird! ATI Drivers work only after logout, followed by "startx" in prompt pitchaxistheory Mandriva 1 10-14-2004 05:51 PM
How to disable "linux single" at lilo prompt hus Linux - Security 1 05-09-2004 02:22 AM
Red Hat 9 hang at "GRUB" prompt (with XP) CliffLo88 Red Hat 1 09-29-2003 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:44 PM.

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