Browse
Hewlett Packard Enterprise Community
Sign In
Help
Community Home
>
Servers and Operating Systems
>
Operating Systems
>
Operating System - HP-UX
>
Changing the prompt
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Printer Friendly Page
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Changing the prompt
SOLVED
Go to solution
Highlighted
Prasad Joshi
Regular Advisor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
07:22 PM
05-08-2006
07:22 PM
Changing the prompt
Hi all,
I currently see my prompt as this
bash-2.02#
but, i want to change it something having
HOSTNAME and having PWD appended to it.
How can i change it?
Thanks & regards,
Prasad.
Solved!
Go to Solution.
All forum topics
Previous Topic
Next Topic
6 REPLIES
6
m saravanan
Valued Contributor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
07:28 PM
05-08-2006
07:28 PM
Re: Changing the prompt
Prasasd,
Put this following entry in your .profile
PS1="`hostname`$PWD =>"
export PS1
Hope it'll help u.
Regds,
Saravanan
RAC_1
Honored Contributor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
07:32 PM
05-08-2006
07:32 PM
Re: Changing the prompt
With bash shell, it is little different. Put this in .bashprofile or set variable PS1 as follows.
export PS1='\h(\!)${PWD}>'
There is no substitute to HARDWORK
Enrico P.
Honored Contributor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
07:36 PM
05-08-2006
07:36 PM
Re: Changing the prompt
Hi,
put
export PS1=$(hostname)':$PWD # '
in your
.bash_profile
Enrico
Arunvijai_4
Honored Contributor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
07:46 PM
05-08-2006
07:46 PM
Re: Changing the prompt
Hi Prasad,
Just export PS1 variable in your .profile,
export PS1="`tput bold``uname -n``tput rmso` \$PWD #"
This will display hostname in bold and PWD.
-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Prasad Joshi
Regular Advisor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
08:10 PM
05-08-2006
08:10 PM
Re: Changing the prompt
Thaks a lot.
Raj D.
Honored Contributor
Mark as New
Bookmark
Subscribe
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
05-08-2006
08:17 PM
05-08-2006
08:17 PM
Re: Changing the prompt
Hi Prasad,
You can set Prompt also like this:
# export PS1="`tput smso` `hostname` : `tput rmso ; tput bold` \$PWD `tput rmso` > "
Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "