Friday, April 26, 2024
76
rated 0 times [  76] [ 0]  / answers: 1 / hits: 114622  / 2 Years ago, sun, july 10, 2022, 3:39:29

Where can (should) I put my (bash) script so that it can be used (forever) by terminal or by a direct command: Alt+F2?



I know there is /usr/bin and /sbin & /bindirectories but when should I use between them?



Where should I put my script?


More From » command-line

 Answers
5

Don't use these directories:




/usr/bin, /sbin and /bin




Leave them for package-managed executables.






If you need the script for one user, waltinator's answer is fine.



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/. One advantage: this directory is already in your PATH so there is no need to edit files.


[#25258] Monday, July 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asketbridiculou

Total Points: 168
Total Questions: 116
Total Answers: 115

Location: Antigua and Barbuda
Member since Sat, Jan 28, 2023
1 Year ago
;