Where shall I put my util shell scripts in linux

Crusoe.Xia

I have read the Linux FHS, but still feel a little confuse. If I have some utility shell scripts, shall I put them in /usr/bin or /usr/local/bin or ~/bin?

The FHS says the most user commands goes to /usr/bin, but it also says that administrater should install unpackaged app or host specific stuff in /usr/local, does that means the /usr/local/bin is a better place for my own scripts? Maybe ~/bin is better? I want to know the best way / conventions to do this. Thanks

Matteo Italia

First of all, I wouldn't put anything unpackaged inside /usr/bin, there's already way too much mess in there without adding unpackaged stuff. Leave it to the package manager.

Now, if they are system-wide scripts, I would put them into /usr/local/bin, which is usually way less crowded, is accessible to everyone and editable only by root; if, instead, they are just for your user, you should put them into ~/bin.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Where shall I put my self-written Python packages?

From Dev

Where should I put my bash scripts

From Dev

Where do I put commands to run scripts?

From Dev

How shall I reuse a function in multiple scripts?

From Dev

Where can I share my custom scripts?

From Dev

Where to put wrapper scripts?

From Dev

Shall I save my crontab file in /tmp?

From Dev

Shall I Make my REST Gateway a Library?

From Dev

Where do I put scripts executed by systemd units?

From Dev

Where do I put scripts executed by systemd units?

From Dev

Where should I put system-wide scripts in *nix system?

From Dev

Where do I put my resources in Scala?

From Dev

Where do I put my stubs?

From Dev

Where Do I Put My Extra Into An ArrayList?

From Dev

Where should I put my defaults?

From Dev

Where do I put my helper functions?

From Dev

Where will i put my image resources?

From Dev

Where do I put my favicon?

From Dev

Where do I put my systemd service?

From Dev

Where should I put my source code?

From Dev

Where should I put my lang attribute?

From Dev

Should I put *.sh and *.rb file extensions on all my scripts?

From Dev

Where should I put my CSRF token in my Ember app?

From Dev

Where should I put my gem in my developing gem?

From Dev

Where can I put a user-defined shell function?

From Dev

Where can I put a user-defined shell function?

From Dev

Where should I install my app on Linux?

From Dev

shall I use callback pattern in my custom function? node js

From Dev

What RewriteRule shall I add to my existing rules to fix this?