How do I get the current directory into my prompt?

Posted on 2006-03-27
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

I need to have my current directory into my prompt.

Question by:alim_maze
    LVL 43

    Expert Comment

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

    Accepted Solution

    I'm sorry, try: export PS1="$(ppwd \l)\u@\h:\w>"

    Author Comment

    it works perfectly ..
    thanks a lot ravenpl

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    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…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now