-1

If i want directory changes and with terminal showing me default directory stay ,

when changes directory khan@raselkhan:~$ cd '/media/khan/Development/Express' then showing me below

khan@raselkhan:/media/khan/Development/Express$

But , I want directory changes(/media/khan/Development/Express) and with terminal showing me like khan@raselkhan:~$ directory

How i can fix this ?

2
  • 2
    do you want to have khan@raselkhan:~$ as your command prompt for all the times? without changing it to current directory? Feb 6, 2015 at 10:12
  • yes, I want changes any directory, command prompt for all the times showing me khan@raselkhan:~$ like terminal without changing it to current khan@raselkhan:~$ directory
    – Rasel Khan
    Feb 6, 2015 at 10:15

1 Answer 1

5

Edit your .bashrc file (gedit ~/.bashrc) and change your PS1 there to like as below or add it at the end of the file:

PS1='\u@\h:~\$ '

Save the file, close and reopen the Terminal or source it again(. ~/.bashrc or source ~/.bashrc) and see the changes.

\u - username of the current user (= $LOGNAME),
\h - the name of the computer running the shell (hostname),
\$ - display "$" for normal users and "#" for the root,
@  - display "@"
~  - display "~"
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .