Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- setting user prompt
General
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
Topic Options
- 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
- Email to a Friend
- Report Inappropriate Content
06-14-2002 05:15 PM
06-14-2002 05:15 PM
/bin/bash shell
user@host[pwd]
pwd is full path can anyone help me...?
user@host[pwd]
pwd is full path can anyone help me...?
Step by step
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-14-2002 07:20 PM
06-14-2002 07:20 PM
Re: setting user prompt
Hi
I am using RH7.3.
The default prompt is [user@host dir]$.
Then I checked out "echo $PS1".
[\u@\h \W]\$
So I want to change my prompt something like yours, I set my PS1 as,
PS1=\\u@\\h[\\W]\$
Of course you have to put this command into your .bash_profile or .bashrc in your home directory.
Good luck
I am using RH7.3.
The default prompt is [user@host dir]$.
Then I checked out "echo $PS1".
[\u@\h \W]\$
So I want to change my prompt something like yours, I set my PS1 as,
PS1=\\u@\\h[\\W]\$
Of course you have to put this command into your .bash_profile or .bashrc in your home directory.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-15-2002 12:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-16-2002 02:53 PM
06-16-2002 02:53 PM
Re: setting user prompt
The token for the 'full path' (as against just the last dir in path) is \w, not \W.
so:
PS1='\u@\h[\w]\$ '
This is covered in 'man bash', under the section 'PROMPTING'.
so:
PS1='\u@\h[\w]\$ '
This is covered in 'man bash', under the section 'PROMPTING'.
One long-haired git at your service...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP