What is the difference between bin and sbin in linux




















What are the differences between these? If I'm writing my own scripts, where should I add them? Related: How to understand the Ubuntu file system layout? Improve this question. Related question: unix. Add a comment. Active Oldest Votes. Improve this answer. I have moved my scripts according to your answer but I am still curious — Rumesh.

RumeshSudhaharan you should not do that, because it's managed by the package management. If any other package also wants to use that path, it will overwrite your file. Files in packages can never overlap at least for official repositories , so you are more safe when installing in the local path. Also, it's just for your own convenience and safety. In a local path you can't mess up the system in such a bad way and you can't accidentally replace a system binary.

I like the explanation on the error page : Severity:Serious Certainty:Certain — cutrightjm. Reza Nasirloo. FWIW, sbin has nothing to do with scripts. It stores binaries - even the links provided note that. Show 3 more comments. System directories for binaries man hier hierarchy lists all the directories. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory.

The Filesystem Hierarchy Standard entry in Wikipedia helped me answer the same question when I had it, plus it has a very explanatory table.

The sbin directories contains programs which are generally system administration only. Programs for regular users should never go in them. These must be available before file systems are mounted.

Things like mount , and fsck that are required to check and mount files systems must be there. These may be on a file system other than the root file system. In some cases they may be on a network mounted drive. This identifies them as clearly non-standard, and possibly only available on site. For further explanation try running the command man hier which should provide a description of the recommended file system hierarchy for your distribution.

You may also want to read about the File System Hierarchy on Wikipedia. Sign up to join this community. The best answers are voted up and rise to the top.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 10 years, 8 months ago. Active 1 year ago. Viewed k times. Why are there so many places to put a binary in Linux? What type of binary goes into which of these bin s? Improve this question. Zanna 3, 15 15 silver badges 27 27 bronze badges. Lazer Lazer Calmarius, What? Typically has further subdirectories, e.

To get the ones just for binaries use:. See: Is there a standard place for placing custom Linux scripts? I'm contemplating taking some of my more complex bash scripts in Ask Ubuntu and setting them up with install scripts on github. Here are few examples:.



0コメント

  • 1000 / 1000