making aliases system wide

mathieu.millet at ratp.fr mathieu.millet at ratp.fr
Mon Mar 21 09:40:34 UTC 2005


> -----Message d'origine-----
> De : Mark Sargent [mailto:powderkeg at snow.email.ne.jp] 
> Envoyé : lundi 21 mars 2005 10:20
> À : For users of Fedora Core releases
> Objet : making aliases system wide

Beware about "system wide". Generally speaking, system wide means that you
want things to happen to all users of your computer (for example, here,
everyone will get this alias). It doesn't mean that settings are saved and
restored after reboot.
 
> 
> 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 need to edit the hidden files .bash_profile or .bashrc in your home
directory (If I remember well, one is called by the other, so just write in
just one).

In this file, just add the command you know on a line. I think, looking at
these two files will be self explanatory.

If you want this thing to be system wide (i.e. for all users of your
computer), edit the file /etc/bash_profile and/or /etc/skel/.bash_profile,
/etc/skel/.bashrc

Don't hesitate to take a look at 'man bash'.

> Mark Sargent.

Hope it will help you.

Sincerely yours, Mathieu.
--
Mathieu MILLET.




More information about the users mailing list