Ask Your Question

Why no full current location in terminal ?

asked 2018-06-07 15:00:27 -0500

R S gravatar image

In Ubuntu distros string of terminal starts like this: username@hostname:/var/cache$ In Fedora I see only last directory in the path: [username@localhost cache]$ Why it is made that way ? And I would like to have it Ubuntu way.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-07 16:34:52 -0500

florian gravatar image

That's just a default setting. Why? No clue. But you can change it and customize your bash prompt!

I'll post a few links here that you could take a look at. If you are having trouble following these instructions, let us know


export PS1='[\u@\h:\w]$'

(now you just need to make it permanent by adding the export to your .bashrc config file

edit flag offensive delete link more


Just a quick suggestion for improving this; You do not need to export the PS1 variable for bash to detect it, and all other things being equal, it generally is better to have few variables in the environment instead of many. So consider using just PS1='[\u@\h:\w]$'

muep gravatar imagemuep ( 2018-06-08 13:01:30 -0500 )edit

Question Tools

1 follower


Asked: 2018-06-07 14:46:48 -0500

Seen: 57 times

Last updated: Jun 07 '18