Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A nyways, I just switched from Fedora 8 to Ubuntu 8.04 LTS. I frequently use the terminal. The one noticeable difference between the two is that the Fedora terminal only displays the name of the current directory, whereas the Ubuntu terminal bothers to display the entire path. Its irritating me a lot.
Is there any option available to make the Ubuntu terminal show only the folder name instead of the entire path. I'm sure I can remember which folder is located where.
and see if changing the $PWD part can help. Note that the prompt uses the vaiables USER, HOSTENAME, etc., and substitutes ~ for HOME if it's in the PWD string. Anyhow, you can probably change .bashrc to set the prompt to anything you like when you start a BASH shell.
The bash shell (I assume your using bash)
uses special key sequences to display the prompt.
The prompt is controlled by a variable called PS1.
To see the current prompt, type [B]echo $PS1[B],
the full path is displayed by a \w, to see only the
working dir, you need to change this to a Capital W.
Be sure to set your variable using qoutes:
[B]export PS1="[\u@\h \W]$ " [B]
Note, no spaces around the equal, but a space after the $ if you want it.
Also, from your echo command above, you may have seen a lot of other
stuff, this is usually to set the colors, add those back in if you want.
Variables only exist in RAM, if you want them set when you login
in, add the line above to ~/.bash_profile,
if you want it anytime you open a shell, add it to ~/.bashrc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.