- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Prompt
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 02:21 PM
05-29-2003 02:21 PM
Prompt
hostname$/
hostname$/cd /sbin
hostname$/sbin
Please help to set this up.Thanks for the help .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 02:36 PM
05-29-2003 02:36 PM
Re: Prompt
export PS1='myhost ${PWD##*/} # '
This doesnt put the whole path in the prompt, just the last directory (I don't like real long prompt strings...)
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 02:40 PM
05-29-2003 02:40 PM
Re: Prompt
This is what we use -
PS1="$(hostname):\$PWD
$"
which will look like this -
bcprod:/home/dlamar
$
Best Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 02:40 PM
05-29-2003 02:40 PM
Re: Prompt
PS1=`hostname`':${PWD}>'
export PS1
NOTE: Depending upon your font, the backticks may be indistinguishable from the single quote. The backticks surround the hostname command and the sigle quotes surround the remainder. I did make yours a bit more readable with ':' and '>' but you can remove those if you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 02:42 PM
05-29-2003 02:42 PM
Re: Prompt
PS1="$LOGNAME@`uname -n`:"'$PWD'" ! $ "
export PS1
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 03:14 PM
05-29-2003 03:14 PM
Re: Prompt
PS1='$LOGNAME ${PWD##${PWD%/*/*}/} '
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 07:32 AM
05-30-2003 07:32 AM
Re: Prompt
# Set up logging
HISTFILE=${HOME}/.sh_history_`who am i|awk '{ print $1}'`
date >>$HISTFILE
export HISTFILE
HISTSIZE=500
export HISTSIZE
# Set up shell environment:
HOST=`uname -n`
PS1="\$HOST:\$LOGNAME:\$PWD # ";export PS1
stty erase ^H
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2003 01:27 PM
05-30-2003 01:27 PM
Re: Prompt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2003 12:53 AM
05-31-2003 12:53 AM
Re: Prompt
export PS1="$LOGNAME@`hostname`$ "