Discussion Locked
0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do you chage the prompt of Unix from $ to Current Working directory. ie., the prompt should always show my current working directory as in DOS.
7 replies
by sibasis75
been a long 2 years since I worked on unix but I think its
export PS1 = $
try it
by amd_ghouse
The question was auto-closed by TechRepublic
In your /etc/profile, or .bashrc, or .bash_profile (or the cottect config file for your shell)...
Add something like export PS1="\h:\w\$"
This puts your prompt in the format of hostname:workingdir$
If you wish to omit the host name, just dropthe \h:
jrw
by amd_ghouse
The question was auto-closed by TechRepublic
by basilisk
It depends on what shell you are using - C Shell, tcsh, Kornshell, Bash, etc. I would look in a book documenting your specific shell (like from O'Reilly); nearly all of them show an example of how to change your prompt to display the working directory.
by amd_ghouse
The question was auto-closed by TechRepublic
by amd_ghouse
This question was auto closed due to inactivity
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
0 helpful
5 replies
1 helpful
3 replies
0 helpful
1 reply
0 helpful
1 reply
Question Unanswered
PDF vs HTML
0 helpful
0 replies