Customize Linux bash shell prompt to look like Windows cmd style



To be honest, I am fed up with typing "pwd" command to see where I am in Linux bash shell.

Luckily Linux provides a customization for the prompt of bash shell process.

On bash prompt just type

PS1="\w >"

And viola! Your prompt will change to current directory that you are in.

Watch out it is lower case "w" and don't forget the double quotation marks.

w = current working directory, the full path. e.g. "/usr/bin"

W = base name of current directory. e.g. "bin"


There are two profile files ".bash_profile" and ".bashrc" in which you can specify this change and the modification will be permanent on new bash processes. Just export the configuration in these files as the following and save;

export PS1="\w >"

It is very handy, I like it.

Comments

Popular posts from this blog

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)

3 Must Haves of a Status Report

Is Wharton Business Foundations Specialization Good?