Help answer threads with 0 replies.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 05-27-2008, 02:02 AM   #1
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?

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

Rep: Reputation: 96

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.

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

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
Registered: May 2008
Posts: 155

Original Poster
Rep: Reputation: 30
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
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
Registered: May 2008
Posts: 155

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


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 > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration