You are not logged in.
I'd like to make a systemwide alias instead of putting the alias in each users .bashrc file. Where should i put it?
Thanks!
joe@trusktr.io - joe at true skater dot io.
Offline
I am a new Archer, but I'll take a shot at it . . .
/etc/profile.d
I see a lot of environment variables being set there. Makes sense alias would work there as well.
Offline
The systemwide .bashrc file is located at /etc/bash.bashrc
It also sources /etc/bash.bashrc.local, so I'd say the proper thing to do here is to create that file and put whatever you need to in there, so that upgrades that change /etc/bash.bashrc won't complain about a changed file.
The previously mentioned /etc/profile.d/ should work just fine too.
Last edited by leftylink (2010-06-11 02:46:42)
Offline
hanks guys! Got it working.
joe@trusktr.io - joe at true skater dot io.
Offline
Another option is to put the aliases in a file by themselves, then include them in each user's .bashrc file you want them in with
source /opt/aliases
(or wherever they are)
This has the advantage that not all users are necessarily affected, and you still only need to edit the one file.
Offline
You should put them in bash.bashrc like someone else said, and not source it since the arch bash package has configured interactive shells to do that automatically.
Likewise, comment the section in profile.bash that sources it. Among other things, you end up running /etc/bash_completion twice. When using straight vc, sticking to tmux means interactive shells. The login shell should just set exports.
Offline