Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Say I have created a bash script, which will make an ftp user, mount some paths for that user, etc. Where in the file system it would be proper to place? It would be good to have some resource clearly explaining the file system hierarchy.

share|improve this question

1 Answer 1

up vote 23 down vote accepted

A Google search for "Linux file system hierarchy" will turn up several documents, including this one.

Where you put your script depends on who the intended user is. If it is just you, put it in ~/bin and make sure ~/bin is in your PATH. If any user on the system should be able to run the script, put it in /usr/local/bin.

Don't put scripts you write yourself in /bin or /usr/bin. Those directories are intended for programs managed by the operating system.

share|improve this answer
1  
+1 for actually citing the standard :-) –  sleske Sep 6 '10 at 8:31
4  
Here is a direct link to the home of the documentation. –  Dennis Williamson Sep 6 '10 at 8:37
    
I'm using Ubuntu and found that ~/bin will be automatically included in your $PATH once the folder is created. There are lines in .profile: if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi –  Kenneth L Aug 26 at 9:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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