Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows I can install software, say MySQL. Its installation files are in a unique folder for that application. But in Linux, if we install it, its installation files are in different folders, such as in /etc/, /var/, etc.

Why does this type of installation happen?

I don't really understand where all these files are staying.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Windows

Application binaries are in

  • C:\Program Files\Appname or
  • C:\Program Files (x86)\Appname or
  • Another directory chosen by the developer or
  • Another location chosen by the user or corporate policy

Sometimes, applications install shared libraries in

  • C:\Windows\System32

Application settings are stored in

  • The registry under several keys
    • in several files whose location depends on whether you have a roaming profile

Application saved data is saved in

  • An applications specific subfolder of users "home" directory (but not "My Documents")
    • Documents and Settings (XP)
    • AppData (Vista)

Linux

See Linux Filesystem Hierarchy Standard (FHS)

  /opt    Optional application software packages
  /home   Users' home directories, containing saved files, 
          personal settings, etc.;

etc.

Conclusion

Linux is no more complex and arbitrary than Windows. Just following a different tradition.

share|improve this answer
add comment

On linux the idea is, generally, to install such software using your distros package manager and generally not bother about installation directory like in windows. Linux root filesystem folders each have different purposes, and thus the reqd files will be split among them.

There are unconventional ways to do it the linux way somewhat. For instance some large third party softwares (games for e.g) install themselves entirely in /opt and then symlink (like shortcut) their bin into /usr/bin. Or you can just not "install" - get code, compile and then run directly, you control everything in that case..

But as i said best practise is to use the package manager whr possible. There are other advantages like automatic updates etc.

One reason you need the path in windows and not in linux is that in windows you need to create a shortcut to the exe file or navigate to the dir to invoke it. In linux you can just open terminal (or Alt + f2 in ubuntu ) and just type "mysql" and you are in business.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.