1

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.
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
potato
  • 423
  • This question is too broad in scope. Answers differ by operating system, and you have not specified which Unix or Linux operating system you are asking about. – JdeBP Sep 20 '18 at 18:03
  • 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 https://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
  • I typically have all the four in my PATH, even on user accounts. – 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
  • Thanks @peterh for the info. I'm sorry about the "i". I always forget about it since english is not my native language. Also, thank you for clarify my doubt about useradd. I've tought that all of OS commands were in /bin when actually they are only the minimun amount of commands in order to boot the system. – potato Sep 21 '18 at 17:56
  • 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
  • 1
    I think the Linux way is not that we close the doors with everything, the Linux way is that we are cooperating with everything. Thus, "Linux and any other OS" questions should be all ontopic, just like emulators and comparison questions like yours. But it seems my views are in minority, unfortunately. :-( – peterh Sep 21 '18 at 18:04
  • 1
    Also I dislike microsoft and win, probably more than the people who closed your question, but this dislike motivates me exactly into the opposite direction as them. – peterh Sep 21 '18 at 18:05
  • 1
    Thanks for your patience and support. However, I believe I've never mentioned other OSs. My questions are about getting a better knowledge and understanding on how Linux works. I know Windows and Linux are two completely different things with different philosophies. That's one of the things that made me like Linux but, at least for me, the learning curve is too steep and, if I don't get things right, I tend to get frustrated and send everything to hell. – potato Sep 21 '18 at 18:42

0 Answers0