?
Solved

How do I get the current directory into my prompt?

Posted on 2006-03-27
3
Medium Priority
?
280 Views
Last Modified: 2010-07-27
Hi there ..

How do I get the current directory into my prompt?
I am using
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
Solaris 9

and my favorite SHELL is
bash-2.05$

I need to have my current directory into my prompt.

Regards,
Alim
0
Comment
Question by:alim_maze
  • 2
3 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 16299706
try this in Your $HOME/.bashrc
export PS1="${USER}@${HOST}:${PWD} > "
see what happend
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 200 total points
ID: 16299716
I'm sorry, try: export PS1="$(ppwd \l)\u@\h:\w>"
0
 

Author Comment

by:alim_maze
ID: 16299799
it works perfectly ..
thanks a lot ravenpl
Regards,
Alim
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question