Wednesday, January 12, 2011

Global bashrc on linux

To be able to set an environment variable or command for all users on linux, you will have to modify the file:
/etc/bashrc
or
/etc/bash.bashrc

Then add an alias at the top for example:
alias vi=vim

Then save the file. To execute the bashrc file do one of the following:
1. Logout and login again
2. Or you can execute the bashrc into the environment using:
[bash#] . /etc/bashrc

Hope you found it useful.

No comments:

Post a Comment