bashrc or bash_profile ?
Hey i using gentoo. i want when i put ls, my show command ls --color , where i must this write
alias ls = 'ls --color' right ? |
.bashrc is the most common place for an alias
|
i write alias ls = 'ls --color' in /etc/skel/.bashrc (gentoo) but this not work. Anywhy help :)
|
Don't put it in /etc/skel but in your home directory. /etc/skel is a "model" for files that will be copied to every new user's home directory when users are added to the system, .bashrc won't get read from there. You can also place your alias in /etc/profile if you want it to work for all the users.
|
i put this in /etc/profile but this not work, while i don't write command source /etc/profile ?
|
Try putting it in ~/.bash_profile.
Some distros read this rather than ~/.bashrc. If you want the change to affect all users try putting it in /etc/.bashrc |
Or just put source /etc/profile in your ~/.bashrc ;)
The thing is that /etc/profile will only get read when you login into your system (i.e. not when you for example open new terminal windows). adding the above to .bashrc will force /etc/profile to be read everytime that bash starts. |
All times are GMT -5. The time now is 09:11 AM. |