LinuxQuestions.org
Visit Jeremy's Blog.
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 11-11-2010, 01:05 PM   #1
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Rep: Reputation: 5
prompt problem


hello y'all, was messing around with my os, and changed my shell from the original shell BASH to CSH, then back again, i notice that after i did that my prompt changed from what its use to be to this BASH -02 as my prompt , and have used ps1 over and over again but its still stay the same after evry reboot. i need help getting my original prompt back as jack@localhost jack> waiting in anticipation. thanks again
 
Old 11-11-2010, 01:13 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Hi,

Add the line
Code:
PS1="\[\u@\h \W]$ "
to your

Code:
.bashrc
file in your home directory
If it doesn't exist, create it

Kind regards

Last edited by repo; 11-11-2010 at 01:15 PM.
 
Old 11-11-2010, 01:17 PM   #3
koen plessers
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: Mint
Posts: 191

Rep: Reputation: 30
Hello

Here you can find information on the prompt: http://linuxconfig.org/Bash_prompt_b...-customization

If you want to know what is in PS1, open a console and type less .bashrc | grep PS1

Bye

Koen
 
Old 11-11-2010, 11:55 PM   #4
sinuhe
Member
 
Registered: Apr 2010
Location: Utah
Distribution: Slackware
Posts: 47

Rep: Reputation: 4
Re: Prompt Problem

> was messing around with my os, and changed my shell from the original
> shell BASH to CSH, then back again

What does this mean? For instance, do you mean you ran chsh, changing to /bin/tcsh (as defined in /etc/shells), then changing back to /bin/bash? This would have been the correct way.

The shell is defined in the last field of /etc/passwd. Type "getent passwd $USER" to identify the shell you are currently using. Run chsh to change your shell to your desired login shell.

> i notice that after i did that my prompt changed from what its use to > be to this BASH -02 as my prompt

I'm not quite sure what this means. The default Bash prompt will give you something like "bash-4.1$ "; is that what you mean? If so, that means you do not have the PS1 variable defined in your login profile. This is documented in the bash info manual (type 'info bash'), under Bash Startup Files.

Typically, this is already defined in /etc/profile or /etc/profile.d/. What distribution are you running?

> ps1 over and over again but its still stay the same after evry reboot.

That's because PS1 must be pre-defined in your shell environment when you log in.

> i need help getting my original prompt back as jack@localhost jack>

If this is Bash, add the following entry to your $HOME/.bash_profile:

export PS1="\u@\h \u> "
 
  


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
problem regarding the prompt dipica Linux - Newbie 1 04-01-2010 08:22 AM
passing parameters from a unix shell prompt into a windows cmd.exe prompt nano2 Programming 1 09-01-2009 12:26 PM
bash prompt problem bjharker Linux - Newbie 5 07-18-2006 03:50 PM
Terminal Prompt Problem kissme1 Linux - Newbie 12 07-07-2006 05:45 AM
bash prompt problem akudewan Slackware 7 03-09-2005 08:21 AM


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