making aliases system wide

Michael A. Peters mpeters at mac.com
Mon Mar 21 10:03:08 UTC 2005


On 03/21/2005 01:19:30 AM, Mark Sargent wrote:
> Hi All,
> 
> I know that alias shows all aliases, and alias dirmysql='cd /usr/ 
> local/mysql' allows me to just type dirmysql @ the promt to move to  
> the mysql dir. But, how do I get this to be system wide and remain  
> after a reboot. At the moment, if I open another terminal window  
> after making the alias, it doesn't carry over to the new one. My  
> book, Beginning Fedora2(I'm using 3 now) covers only how to make the  
> alias. Could someone tell me what I need to make it permanent, or  
> what I'm not understanding.? Cheers.

You can put it in your .bashrc file.

To do it systemwide for ALL users - put an executable shell script that  
sets it in /etc/profile.d/ (don't modify an existing file in there,  
make a new one)

For an example of what that would look like - run

cat  /etc/profile.d/which-2.sh

You want to make a file of that form and make it executable in /etc/ 
profile.d/

but only if you want it system-wide (for just your user, edit .bashrc  
in your home (~) directory )

-- 
Michael A. Peters
http://mpeters.us/






More information about the fedora-list mailing list