LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 05-27-2008, 02:02 AM   #1
wrapster
Member
 
Registered: May 2008
Posts: 155

Rep: Reputation: 30
how to keep changes to PS1 across terminals?


hi all,
I would like to know how to make a custom system prompt rather than a default bash3.2#

I tried changing PS1 but i was able to only change for that particular terminal...
How do i keep the changes across the terminals?

Thanks
 
Old 05-27-2008, 03:24 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Put the PS1 assignment (and an 'export PS1') in ~/.bash_profile, and it should be applied for any subsequent bash shells. You'll need to log out and back in for it to take effect.

Dave
 
Old 05-27-2008, 09:10 AM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
Normally I put it in either my .profile or .bashrc file.

Straight from my .profile:
PS1="\u@\h \w --> "
 
Old 05-27-2008, 07:31 PM   #4
wrapster
Member
 
Registered: May 2008
Posts: 155

Original Poster
Rep: Reputation: 30
Hi
I checked out my HOME dir, but there no file called .bashrc...
find / -name .bashrc -print ,also yielded nothing
I am using Solaris b83
 
Old 05-28-2008, 05:17 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,481

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
You are free to create a .bashrc file in your HOME directory.

For a better understanding of bash startup files, your can have a look at its manual page.
 
Old 05-28-2008, 09:51 PM   #6
wrapster
Member
 
Registered: May 2008
Posts: 155

Original Poster
Rep: Reputation: 30
Ok thanks ...
Will do that and let you know!!
 
  


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
PS1 = * in bash, where '*' = parameters BlueSpirit Slackware 5 11-05-2006 08:21 AM
changing PS1 with a script walterbyrd Linux - General 3 02-05-2006 01:09 PM
Terminals - spying on local terminals with ssh BeatRyder Linux - Software 5 10-21-2004 01:47 AM
$PS1 different in X and prompt codec Slackware 7 06-27-2004 04:42 PM
PS1 variable wogga Red Hat 2 05-26-2004 05:39 PM


All times are GMT -5. The time now is 08:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration