Where Best to Put your Local User Scripts in a GNU/Linux system?

Where Best to Put your Local User Scripts in a GNU/Linux system?

In General its best to put it in /usr/local/bin/

If you have to ask then Don't use these directories to store your user scripts:

/usr/bin, /sbin and /bin

Leave them for package-managed executables.

If you need the script for all users on your system (but you can also use this for one user), stick it in /usr/local/bin/. An advantage to this is that the directory is already in your PATH so there is no need to edit files.

But it can also depend in who will use the scripts



It depends on who will use your script:

    Yourself only - $HOME/bin 
    You and other local users - /usr/local/bin
    Root only - /usr/local/sbin

That way you have your own scripts separated from the distribution-provided binaries.

0 comments:

Post a Comment