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.
Hi,
Just a few things that are really annoying me...
On the console...
1. How do I make bash the default shell for new users (currently it is sh)?
2. Where are the default settings stored (ie for things like alias)?
3. I have put a .bashrc in my home dir which adds some more aliases. When I log in they are not there ('echo $SHELL' shows the shell to be bash), but if I then run bash (inside itself), the new aliases appear. How do I fix this?
In aterm (actually in any terminal)...
4. What is it called when the prompt is "user@host:dir$"?
5. All of my terminals only give me a "bash-2.05b$" prompt- how can I get the above instead?
in modern Linuxes sh is just a link to bash so you dont have to bother yourself.
Your setting will be stored in you home dir in file named .bash_profile
try typeing the following to change the prompt
Code:
export PS1="\u@\h:\w$"
I'm not sure about the escape chars but give it a try it shall work.
You can sutomize the shell prompt by changing the variable $PS1. Plz look at the bash info page for more infromation on $PS1 variable.
3. I have put a .bashrc in my home dir which adds some more aliases. When I log in they are not there ('echo $SHELL' shows the shell to be bash), but if I then run bash (inside itself), the new aliases appear. How do I fix this?
---
.bashrc is not read from a login shell by default. To fix this, add the following to $HOME/.bash_profile:
Thanks,
One more thing thats annoying me...
Aterm (and xterm and rxvt) puts all coloured text in bold- I use a small font and it makes it very unclear- how can I stop the terminals from doing this?
I can tell you how Red Hat does it. You might have to investigate if your distros do it differently.
Essentially, the global bash configuration (/etc/profile) executes every script in /etc/profile.d. In that directory, there are a number of scripts, with one of them named colorls.sh. That script looks for a color definition file. It defaults to a global one, and then overrides that location if it finds a better one (in your home directory for instance). Then it executes the commands to create the colors in commandline utilities.
What you're interested in is finding and editing the color definition file. For Red Hat, it looks for /etc/DIR_COLORS (as a default), and proceeds to look at your home directory for .dircolors or .dir_colors (along with some other gyrations based on the terminal type). Find the one the system is using, and modify it or copy it to your home directory. Open up a text editor, and scroll through the file. You'll see lots of numeric codes sprinkled throughout. For example, in my global definition file:
Code:
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
As the comments at the top state, to make something bold, add a 01. To get rid of bold, just delete that same code.
You'll likely have to log out for the changes to take effect.
Last edited by Dark_Helmet; 08-12-2004 at 12:49 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.