Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
72
rated 0 times [  72] [ 0]  / answers: 1 / hits: 163431  / 2 Years ago, sun, january 16, 2022, 10:20:38

I am developing a set of scripts, which I want to be present for all users, when I set up a server. But I don't want them in the standard locations like /usr[/local]/[bin],[sbin] etc.



Is there some existing convention for where such scripts should be placed?


More From » scripts

 Answers
2

As far as I know there is no place for custom Linux scripts. The directory that should be used for custom install is the /opt directory so it would be the safest option to place them there.
But keep in mind that for a script to be able to be used without the full path you need it to be included in the PATH variable.



If you need help changing the PATH variable for all users you can check How do I set PATH variables for all users on a server? which refers you to the /etc/environment file to configure this.



If your concern is to avoid clashes but you don't want to add another route to the PATH variable you could use /usr/local/bin. In my server installation it doesn't have any file so that it could be a easy work-around.



Hope it helps


[#35177] Monday, January 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atelti

Total Points: 194
Total Questions: 129
Total Answers: 110

Location: North Korea
Member since Tue, Jun 16, 2020
4 Years ago
atelti questions
Fri, Aug 26, 22, 02:44, 2 Years ago
Sat, Dec 10, 22, 21:37, 1 Year ago
Sat, Apr 9, 22, 13:57, 2 Years ago
;