I've written a what I think quite useful function and I want to make it public via GitHub. On my PC I have a .bash_functions file which I source into my .bashrc file. I know this is the common approach (at least for bash) but I don't know if it is very userfriendly to expect from my users to put the function in there manually.

So, my question is, is there maybe some unified global place (somewhere in etc maybe) where I can put my custom functions which get then sourced at startup? So that when the user want's to install this function he just needs to type make and it will be placed into this folder?

closed as off topic by Michael Hampton, EEAA, HopelessN00b, Scott Pack, John Gardeniers Nov 20 '12 at 0:57

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.


I think It's good idea to use .bashrc but if you want a global way then you can put your file with functions in this place


Also you can use other way


and put there

[ -r /path/to/your/file ] && . /path/to/your/file

Not the answer you're looking for? Browse other questions tagged or ask your own question.