Where Should I Put Scripts in Linux?
Contents

System-wide ones go in /usr/local/bin or /usr/local/sbin as appropriate (scripts which should only be run as root go in sbin , while scripts intended to help ordinary users go in bin ), rolled out via configuration management to ensure that all machines that need them have them (and the latest versions, too).

Where do I put custom scripts in Linux?

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 .

Where do you put scripts?

You can place any number of scripts in an HTML document. Scripts can be placed in the <body> , or in the <head> section of an HTML page, or in both.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest