I understand that I have the /computer/usr/share path as well as the /computer/opt path. I noticed sometimes, like with programs such as Google Chrome and Teamviewer, they automatically installed themselves in my /computer/opt directory. However, for programs such as VSCode, I had to manually move the tar.gz file into my /opt directory, and then extract there. Why do some programs do this automatically, while others have to be done manually?

Also, when installing programs, what is the best directory to install them in? (i.e. what is the Linux equivalent to Program Files (x86) for Windows?)

Thank you.

  • Perhaps this link will help: help.ubuntu.com/community/LinuxFilesystemTreeOverview . I have to admit that I don't know where your /computer comes from. /usr and /opt should be off of the root directory.
    – Ray
    May 21, 2016 at 15:24
  • @Ray name@name-myComputer:~$ this is what shows up when I first open the terminal. Is this my root path?
    – user529161
    May 21, 2016 at 15:30
  • Uh, no. Your root directory is /. I think that link I sent to you mentions that. The prompt is the default prompt (yes, you can change it). It just says that your login name is name and the name of your computer is name-myComputer. The ~ is your "home directory" -- the highest directory for a user. You can type pwd to find out what is the current directory. I guess I'm getting a bit off-topic. If anything I've said sounds confusing, perhaps you should look for tutorials on navigating through directories?
    – Ray
    May 21, 2016 at 15:50
  • @Ray when I open the terminal and type pwd it says " / ". So does that mean I am in root by default? I'm sorry, this stuff is sort of confusing to me.
    – user529161
    May 21, 2016 at 16:09
  • This post explains about the installation folders in ubuntu (or linux in general)- Where are programs installed
    – ankit7540
    May 21, 2016 at 16:56

1 Answer 1


There is no C:\Program Files\ in linux "per se". Therefore it doesn't exist one single (default) place where programs where to install. Actually many linux programs installs all over the place, parts of them installs in different folders. That's happening for performance optimization - one of many reasons why linux runs faster than Windows.

Best practice is to allow the program to install wherever it wants. Don't worry about volume fragmentation. That's virtually non-existent in linux.

The same thing happens in Windows too, when some big programs are installing files in ProgramData or CommonFiles folders. I've seen programs installing in Program Files (x64) and their respective Licence Key Server installing in Program Files (x86). Many specific user data may install in C:\Users\Documents\.

When a program uses many per-user options and files, it ussually installs to /usr/share. When it does not, it ussually installs to /opt. You could say that /usr is the equivalent of Users folder from Windows. /opt stands for optional software (that doesn't come bundled with the Ubuntu original disk).

For in-depth details of where and how linux programs are installed, please see this topic: Where are my installed applications

There is no single Program Files because of security reasons. Trusted applications (verified by the Software Center) may install in more sensitive places like /bin (=binaries) or even /sbin (=superbinaries), while untrusted (unverified) apps are installed in secure and secluded locations like /opt.

  • Can you elaborate what is this "performance optimization" that makes Linux run faster than Windows? Apr 9, 2019 at 10:49
  • "All over the place" is misleading. there is a structure, an order to this, and its well documented. It is called FHS Filesystem Hierarchy Standard see this: refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf it'll tell you about the organization, and motivation to the linux structure, as well as where to put what types of files exactly.
    – j0h
    Aug 23, 2019 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy