Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I have just installed Gentoo, and boy what a long process that was, and I would like to modify my "console" to suit my likings. How can I get information on modifying what the prompt text/color is for bash? Right now, it's "bash-2.05b#" for all non-root users and "gentoo directory #" for root user where gentoo is red and directory is blue. Can someone help me find this documentation? I know that I have to export in my /etc/profile and there is even one already in there, with the code to only highlight for root user, but I would like to see all options I have instead of just the one defaulted by gentoo. Thanks, Jeremy
Also a thread around here about 'What's your prompt look like?' and 'man bash'. ~/.bash_profile and ~/.bashrc are key after /etc/profile. Also /etc/DIR_COLORS and ~/.dir_colors. 'man dircolors' for some good stuff there. Hard to be real specfic - only you know if you want xml files to be chartreuse.
Here is a link to an article written by, none other than, the President-CEO of Gentoo Technologies, Daniel Robbins. This sould get you well on the way to configuring your own bash prompt, or just copy one of Danials. I personally like the one that puts the current working directory and hostname in the title bar.
Well...I have my bash prompt looking the way I want but now, I need to figure out how to make it work like Red Hat does. In Red Hat, you can do "ls -a" and the files are colored depending on the type of file they are and the permissions. Can someone help me out or point me in the proper direction regarding this? Thanks, Jeremy
I don't know how Red Hat does it specifically, but that's where dircolors probably comes in - and it may be a combination of putting aliases in the bash configs, as well. 'ls -a' is standard but if you want the 'll's and so on, those would be aliases and the coloring of the files would be configured through dircolors. Between what the prompt configuring said about colors and what's in /etc/DIR_COLORS, it's pretty straightforward.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.