Sunday, July 7, 2013

Remove path from prompt in ubuntu

Most of the times in linux machine, you will get a prompt which shows complete path of present working directory i.e pwd. It looks like as -"/home/akash/dir1/movies/hindi/latest$"
But I want to see only "$" prompt on my terminal.
How to achieve this?
Ans: Simple, just export following variable or add it to .bashrc file
export PS1="\u $ "

No comments:

Post a Comment