1

This question already has an answer here:

I'am trying to learn about the filesystem hierarchy but I can't get my mind wrapped around some of the concepts.

  1. /mnt: What do I put here? In theory, is a place for mounting temporary file systems so, where do I mount the 3 extra hard-drives that are in my computer?

  2. /usr: here is where all the programs that are not a part of the OS go (Thunderbird, Gimp,...) so, why is useradd command in /usr/sbin? Isn't user management an intrinsic part of the OS?

  3. if all the software that is not part of the OS is intalled in /usr (/usr/bin, /usr/lib,...), why the configuration files are in /etc? shouldn't they be in /usr/etc/?

  4. /opt: What's the difference between /opt and /usr?

EDIT:

I do not see, in the post indicated, the answers to:

  1. where do I mount the 3 extra hard-drives that are in my computer?
  2. why is useradd command in /usr/sbin? Becasue in /bin only goes what's necessary for starting up the system.
  3. why the configuration files are in /etc? shouldn't they be in /usr/etc/?
  4. What's the difference between /opt and /usr? I've already found the answer to this one. /opt is for software that is not part of the distro nor the official repository.

marked as duplicate by jasonwryan, agc, user88036, Kusalananda linux Sep 20 '18 at 18:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    @JdeBP The question asks for Linux, and I think it is enough specific to assume the Filesystem Hierarchy Standard in it. – peterh Sep 21 '18 at 17:41
  • 2
    @potato , Welcome on the Unix SE. A large part of the voters see the comparison of Linux/Unix to other operating systems as offtopic, because it is about also from other OSes. I disagree them, thus I voted to reopen your question, but I am not sure, if it will be enough (4 other reopen votes are also needed). You might try superuser.com , if your question won't be reopened in roughly a day. (Little side note: please write "I" always in uppercase, it looks really not very well!) useradd is in /usr/sbin because it is used mainly by root, but it is not required for system startup. – peterh Sep 21 '18 at 17:46
  • 2
    The logic in the sepration of /bin, /sbin, /usr/bin, /usr/sbin is this: 1) /bin and /sbin has the binaries which might be required for a typical system boot. Which aren't, are going in /usr/bin or in /usr/sbin. 2) /sbin and /usr/sbin means that the tool is mainly used only by root or it requires equivalent privileges for the typicaly ordinary work. Others are going in /bin or /usr/bin. | These are not very strict directives, sometimes you need something from /sbin or /usr/sbin even as an ordinary user, or some system boot process uses something in /usr, but these are rare. – peterh Sep 21 '18 at 17:51
  • 1
    Btw, the superuser.com has some other disadvantages, so in general, I would suggest to come with Linux-specific questions here. You can see the whole list of all SE sites here, feel free to pick the most sympathic ones. :-) All of them has advantages and disadvantages, try them and you will see. – peterh Sep 21 '18 at 17:53
  • 2
    @potato Yes, and "useradd" is executed 1) typically by root, 2) and on an already long booted, running system. This is why is it in /usr/sbin. I didn't ever seen as useradd was called as part of the boot process (well, except some docker container initialization). I've seen only very rarely as a non-root called useradd (typically, even they did with sudo). – peterh Sep 21 '18 at 17:59