- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Root Prompt Profile
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-13-2002 04:24 AM
05-13-2002 04:24 AM
I want to change the PROMPT for user root. The prompt is only "#" and I want to change to "hostname - ROOT $". The root shell is /sbin/sh and the home directory is "/". I try to change in .profile but did not have success.
Cheers,
Mauro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2002 04:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2002 04:33 AM
05-13-2002 04:33 AM
Re: Root Prompt Profile
beware of straying away from standards - I'd never use '$' in the prompt for root, as some sysadmin might come along and think he's not root... (one rm -rf later...)
Stick to using '#' at the end of roots prompt, you can put anything else before this though.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2002 04:36 AM
05-13-2002 04:36 AM
Re: Root Prompt Profile
Steve has already given the syntax for changing the PS1 prompt in your profile. Howver, be aware that *by standard* root's PS1 prompt is "#" whereas the PS1 prompt of a non-root user is "$". I would suggest you stay with the segregation of those two characters regardless of what else (hostname, current working directory, etc) you add to the PS1 string.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2002 05:19 AM
05-13-2002 05:19 AM
Re: Root Prompt Profile
Try this in the root .profile,
export HOST=`/usr/bin/hostname`
export PS1='$HOST - $LOGNAME =>'
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2002 05:37 AM
05-13-2002 05:37 AM
Re: Root Prompt Profile
This is for default KSH
HNAME=`hostname`
PS1='$HNAME:$PWD:#'
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2002 12:04 AM
05-14-2002 12:04 AM
Re: Root Prompt Profile
PS1="`hostname` - ROOT $"
in /.profile
Andrea