What is the Linux equivalent to Windows' Program Files?











up vote
159
down vote

favorite
74












Under Windows, most applications and application data are stored in a special directory known as C:Program Files (and occasionally C:Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?










share|improve this question




















  • 2




    If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
    – Asmerito
    Feb 20 '11 at 8:17






  • 6




    I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
    – Nanne
    May 13 '13 at 9:03






  • 3




    Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
    – Eliah Kagan
    Jul 21 '13 at 2:43















up vote
159
down vote

favorite
74












Under Windows, most applications and application data are stored in a special directory known as C:Program Files (and occasionally C:Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?










share|improve this question




















  • 2




    If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
    – Asmerito
    Feb 20 '11 at 8:17






  • 6




    I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
    – Nanne
    May 13 '13 at 9:03






  • 3




    Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
    – Eliah Kagan
    Jul 21 '13 at 2:43













up vote
159
down vote

favorite
74









up vote
159
down vote

favorite
74






74





Under Windows, most applications and application data are stored in a special directory known as C:Program Files (and occasionally C:Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?










share|improve this question















Under Windows, most applications and application data are stored in a special directory known as C:Program Files (and occasionally C:Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?







filesystem






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '16 at 20:33









Kaz Wolfe

25.8k1373133




25.8k1373133










asked Feb 20 '11 at 7:36







user11154















  • 2




    If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
    – Asmerito
    Feb 20 '11 at 8:17






  • 6




    I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
    – Nanne
    May 13 '13 at 9:03






  • 3




    Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
    – Eliah Kagan
    Jul 21 '13 at 2:43














  • 2




    If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
    – Asmerito
    Feb 20 '11 at 8:17






  • 6




    I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
    – Nanne
    May 13 '13 at 9:03






  • 3




    Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
    – Eliah Kagan
    Jul 21 '13 at 2:43








2




2




If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
– Asmerito
Feb 20 '11 at 8:17




If you want to know where are the files of specific package, you can use Synaptic package manager. Just search for package, and see its installed files.
– Asmerito
Feb 20 '11 at 8:17




6




6




I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
– Nanne
May 13 '13 at 9:03




I think this question would be improved by a reason for wanting an equivalent. There is a difference between, for instance, "lets see what I have installed and what I can run", and "I'm trying to find the save-game of this/that piece of software, so I can fiddle with it" and maybe even "I suspect some setting-file / ini-file for this program that I can tweak". Those could all be "Program Files" question, but have different answers here.
– Nanne
May 13 '13 at 9:03




3




3




Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
– Eliah Kagan
Jul 21 '13 at 2:43




Related (but probably shouldn't be considered a duplicate): How to understand the Ubuntu file system layout?
– Eliah Kagan
Jul 21 '13 at 2:43










10 Answers
10






active

oldest

votes

















up vote
94
down vote













/bin and /usr/bin is where the scripts are that start the programs. The direct equivalent of "Program Files" though is probably /usr/share. That directory contains the various support files for most programs.



Nautilus showing /usr/share



There probably isn't a direct equivalent however, since, for example, library files are shared across the system (in /lib) and options are either user specified (in the user's home directory) or universally located in /etc.



So installing a program via a deb file, repository or build will likely place files in all of these locations.



[EDIT] And as others note, there is also /sbin and /usr/sbin. Plus /usr/local/bin, /opt/bin and even /usr/games/. So definitely not a direct comparison to c:program files!






share|improve this answer



















  • 4




    How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
    – Kupiakos
    May 14 '13 at 0:12










  • Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
    – Scaine
    May 14 '13 at 23:03










  • See askubuntu.com/a/294492/41499 for what the /opt directory is for.
    – Gerhard Burger
    Jul 5 '13 at 6:36










  • /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
    – Mark Stewart
    Nov 21 at 0:44


















up vote
74
down vote













EDIT: See also d4nyll's answer below for an excellent and beginner-friendly map!



Read my answer below for more info on what the PATH environment variable is, what .desktop files are, and how to find a specific program using various linux commands.



Original answer:





There is no easy answer.




/bin,/usr/bin, and /usr/share



As mentioned in the other answers, you can find most executables under /bin or /usr/bin, and the support files are installed in /usr/share.




/usr/local and /opt



There are however more directories in which Ubuntu installs applications. The PATH variable, which determines where to search for an entered command, might give you a clue, mine looks like (echo $PATH in a terminal):



/usr/local/cuda/bin:/usr/local/texlive/2012/bin/x86_64-linux:/usr/games:/home/gerhard/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


As you can see some software is installed in /usr/local and have their own directory and bin. Another place where many programs are installed is /opt. The properties of these locations are explained by the Filesystem Hierarchy Standard, which is a very good read. Unfortunately, the difference between /opt and /usr/local is not very well explained, someone on the unix stackexchange had a more elaborate explanation:





  • /usr/local is a place to install files built by the administrator, usually by using the make command. The idea is to avoid clashes with files that are part of the operating systems that would either be overwritten or overwrite the local ones otherwise. eg. /usr/bin/foo is part of the OS while /usr/local/bin/foo is a local alternative,


  • /opt is a directory to install unbundled packages each in their own subdirectory. They are already built whole packages provided by an independent third party software distributor. For example someapp would be installed in /opt/someapp, one of its command would be in /opt/someapp/bin/foo [and then usually a symbolic link is made in one of the bin directories in the PATH, or the program is called from a desktop file (see below)].




Finding a specific program or command




.desktop files



To find out where a specific program is installed, you can do a number of steps. First you need to locate its .desktop file. Desktop files are simular to shortcuts in Windows, and for system applications they are located in /usr/share/applications. The desktop files for applications that are only available for the current user are in ~/.local/share/applications. Take for example Google Chrome, which has the desktop file /usr/share/applications/google-chrome.desktop and look for the line that starts with Exec=, this determines how to start Google Chrome. It says:



Exec=/opt/google/chrome/google-chrome


So you know Google Chrome is in /opt.



Now for Mozilla Firefox which is located in /usr/share/applications/firefox.desktop. It simply says



Exec=firefox %u


At first this doesn't seem to help that much, but then you realize that firefox must be in a directory that is in the PATH variable (most likely a bin), and we can look it up (see below).



Looking up commands



To look up commands you can use one or more of the following: type, which and whereis (I've included a link to their manual pages online).





  • type: it describes a command, and indicates how it would be interpreted if used as a command name. Possible types for a command are:




    1. alias (shell alias)

    2. function (shell function)

    3. builtin (shell builtin)

    4. file (disk file)

    5. keyword (shell reserved word)


    (type itself is a shell builtin, try it with type type :P)



    Executing type firefox gives us



    firefox is /usr/bin/firefox


    which is what we wanted to know




If a command is a file (which you checked with type) you can then also use:





  • which: shows the full path of the command,



    Executing which firefox gives us



     /usr/bin/firefox



  • whereis: locate the binary, source, and manual page files for a command.



    Executing whereis firefox gives us



    firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz



Bonus



You can inspect /usr/bin/firefox closer with ls -l /usr/bin/firefox and this gives:



/usr/bin/firefox -> ../lib/firefox/firefox.sh*


It appears that /usr/bin/firefox is 'only' a symbolic link to the script /usr/lib/firefox/firefox.sh. If you inspect the script you discover that the script calls /usr/lib/firefox/firefox.

You may rest in peace now :)






share|improve this answer























  • Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
    – Quazi Irfan
    Jun 2 '15 at 23:35












  • @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
    – Gerhard Burger
    Jun 3 '15 at 5:37












  • Why would someone use .desktop file over symbolic links and vice versa?
    – Quazi Irfan
    Jun 3 '15 at 10:48






  • 1




    @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
    – Gerhard Burger
    Jun 3 '15 at 11:54


















up vote
66
down vote













Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.








share|improve this answer



















  • 4




    this answer is ignored it should be at the top.
    – voldemort
    May 17 '17 at 13:27


















up vote
17
down vote













There is no single directory that is the exact equivalent of Program Files folder. The way Linux arranges things is a lot different than Windows.



In windows, every program that we install gets its own directory inside the Program Files directory. In that directory, further sub-directories are created for different kind of files. There is no fixed structure for sub-directories. Programs decide for themselves what they want to call each directory and where they want to put what.



But in Linux when a program is installed, different kind of files are copied to different locations. Executables are copied to /usr/bin, library files to /usr/lib, documentation to one or more of /usr/man, /usr/info and /usr/doc. If there are configuration files, they are usually in the user's home directory or in /etc.






share|improve this answer





















  • Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
    – jojman
    Nov 17 '16 at 23:58






  • 1




    not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
    – binW
    Nov 23 '16 at 15:27


















up vote
10
down vote













The C:Program Files folder would be /usr/bin in Ubuntu. /bin looks more like C:windows.



From the manual page of the filesystem hierarchy:



/bin      This directory contains executable programs which are needed  in
single user mode and to bring the system up or repair it.
/usr/bin
This is the primary directory for executable programs. 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.


Ubuntu has a different structure than windows. Ubuntu places almost all applications in one directory, say /usr/bin. Windows would make a new folder, say Mozilla Firefox, and add configuration, executables, DLL's, images, etc. in it. Ubuntu splits them up, executables go in /usr/bin, system-wide configuration in /etc, shared objects in /usr/lib, images in /usr/share, ...






share|improve this answer




























    up vote
    4
    down vote













    Linux 'Program Files' are in the whole hierarchy. It could be on /usr/bin, /bin, /opt/..., or in another directories.



    I think you are going to find some file related to your application. Then, I have an idea on how to looks files which are installed on program installation.




    1. Install synaptic by issuing sudo apt-get install synaptic on terminal.

    2. Look for package you want, search on the search text input.

    3. Right-click the package and select Properties.

    4. Move to Installed File tab. The result is same as dpkg -L package_name.

    5. There you'll find all files installed for the package.


    It is because linux move the installed file to directories separately based on their type.




    • Executable goes to /usr/bin or /bin.

    • Icon goes to /usr/share/icons or on ~/.local/share/icons for local.

    • Whole application (portable) on /opt.

    • Shortcut usually on /usr/share/applications or on ~/.local/share/applications

    • Documentation on /usr/share/doc

    • Library / module on /usr/lib


    And many other directories. (CMIIW, accepting correction)






    share|improve this answer






























      up vote
      3
      down vote













      In this answer when I say Unix I mean Unix as well as Unix-like operating systems.



      Ubuntu doesn't really have a programs folder containing all of the data for each program. In Unix and Unix-like operating systems, EVERYTHING is a file, even the terminal commands. They're files as well. The way Unix handles programs can be pretty chaotic, and organized at the same time.



      Icons for programs are stored in /usr/share/icons/*, program executables are usually stored in /usr/bin, /bin, and other places with bin directories (bin is obv short for binary). Libraries that programs depend on are in /lib.



      So you end up with not a directory containing all of the data for one program, but the data for the program spread out. While at first this seems very disorganized, it allows for sharing of standard things like libraries and icons.



      Thanks to permissions for each file, the idea of everything being a file is very brilliant to be honest. It makes Unix MUCH more secure than other operating systems.






      share|improve this answer




























        up vote
        3
        down vote













        The way that Linux and Windows programs are installed is quite different.



        The common pattern in Windows is for a program; or a bunch of programs, from one vendor go into its own sub directory in C:programsvendor or something similar.



        In Linux, your files are split up between specific sub directories depending on their function. There are directories for libraries, icons, man pages, Log files, configuration and so on. You may use some of them, but the system will manage all of them. They are not coupled together, but exist together with similar files from other programs.



        So there is no real equivalent to that Windows directory structure in a regular Linux implementation.






        share|improve this answer






























          up vote
          2
          down vote













          If you install own programmes, I recommend 1 folder:




          • /opt






          share|improve this answer




























            up vote
            -2
            down vote













            Look in /bin, /usr/bin, and anything else that says bin.






            share|improve this answer






















              protected by Braiam May 24 '15 at 14:56



              Thank you for your interest in this question.
              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



              Would you like to answer one of these unanswered questions instead?













              10 Answers
              10






              active

              oldest

              votes








              10 Answers
              10






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              94
              down vote













              /bin and /usr/bin is where the scripts are that start the programs. The direct equivalent of "Program Files" though is probably /usr/share. That directory contains the various support files for most programs.



              Nautilus showing /usr/share



              There probably isn't a direct equivalent however, since, for example, library files are shared across the system (in /lib) and options are either user specified (in the user's home directory) or universally located in /etc.



              So installing a program via a deb file, repository or build will likely place files in all of these locations.



              [EDIT] And as others note, there is also /sbin and /usr/sbin. Plus /usr/local/bin, /opt/bin and even /usr/games/. So definitely not a direct comparison to c:program files!






              share|improve this answer



















              • 4




                How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
                – Kupiakos
                May 14 '13 at 0:12










              • Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
                – Scaine
                May 14 '13 at 23:03










              • See askubuntu.com/a/294492/41499 for what the /opt directory is for.
                – Gerhard Burger
                Jul 5 '13 at 6:36










              • /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
                – Mark Stewart
                Nov 21 at 0:44















              up vote
              94
              down vote













              /bin and /usr/bin is where the scripts are that start the programs. The direct equivalent of "Program Files" though is probably /usr/share. That directory contains the various support files for most programs.



              Nautilus showing /usr/share



              There probably isn't a direct equivalent however, since, for example, library files are shared across the system (in /lib) and options are either user specified (in the user's home directory) or universally located in /etc.



              So installing a program via a deb file, repository or build will likely place files in all of these locations.



              [EDIT] And as others note, there is also /sbin and /usr/sbin. Plus /usr/local/bin, /opt/bin and even /usr/games/. So definitely not a direct comparison to c:program files!






              share|improve this answer



















              • 4




                How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
                – Kupiakos
                May 14 '13 at 0:12










              • Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
                – Scaine
                May 14 '13 at 23:03










              • See askubuntu.com/a/294492/41499 for what the /opt directory is for.
                – Gerhard Burger
                Jul 5 '13 at 6:36










              • /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
                – Mark Stewart
                Nov 21 at 0:44













              up vote
              94
              down vote










              up vote
              94
              down vote









              /bin and /usr/bin is where the scripts are that start the programs. The direct equivalent of "Program Files" though is probably /usr/share. That directory contains the various support files for most programs.



              Nautilus showing /usr/share



              There probably isn't a direct equivalent however, since, for example, library files are shared across the system (in /lib) and options are either user specified (in the user's home directory) or universally located in /etc.



              So installing a program via a deb file, repository or build will likely place files in all of these locations.



              [EDIT] And as others note, there is also /sbin and /usr/sbin. Plus /usr/local/bin, /opt/bin and even /usr/games/. So definitely not a direct comparison to c:program files!






              share|improve this answer














              /bin and /usr/bin is where the scripts are that start the programs. The direct equivalent of "Program Files" though is probably /usr/share. That directory contains the various support files for most programs.



              Nautilus showing /usr/share



              There probably isn't a direct equivalent however, since, for example, library files are shared across the system (in /lib) and options are either user specified (in the user's home directory) or universally located in /etc.



              So installing a program via a deb file, repository or build will likely place files in all of these locations.



              [EDIT] And as others note, there is also /sbin and /usr/sbin. Plus /usr/local/bin, /opt/bin and even /usr/games/. So definitely not a direct comparison to c:program files!







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Feb 20 '11 at 18:15

























              answered Feb 20 '11 at 13:21









              Scaine

              8,92943452




              8,92943452








              • 4




                How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
                – Kupiakos
                May 14 '13 at 0:12










              • Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
                – Scaine
                May 14 '13 at 23:03










              • See askubuntu.com/a/294492/41499 for what the /opt directory is for.
                – Gerhard Burger
                Jul 5 '13 at 6:36










              • /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
                – Mark Stewart
                Nov 21 at 0:44














              • 4




                How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
                – Kupiakos
                May 14 '13 at 0:12










              • Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
                – Scaine
                May 14 '13 at 23:03










              • See askubuntu.com/a/294492/41499 for what the /opt directory is for.
                – Gerhard Burger
                Jul 5 '13 at 6:36










              • /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
                – Mark Stewart
                Nov 21 at 0:44








              4




              4




              How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
              – Kupiakos
              May 14 '13 at 0:12




              How about /opt? I've seen that hold many (usually closed-source or app-based) programs before in a similar way to Program Files.
              – Kupiakos
              May 14 '13 at 0:12












              Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
              – Scaine
              May 14 '13 at 23:03




              Seems to be going that way, with the advent of the Ubuntu Software Centre delivering its games there, certainly. But even then, hardly a direct comparison, really, is it? Might the closest thing these days though.
              – Scaine
              May 14 '13 at 23:03












              See askubuntu.com/a/294492/41499 for what the /opt directory is for.
              – Gerhard Burger
              Jul 5 '13 at 6:36




              See askubuntu.com/a/294492/41499 for what the /opt directory is for.
              – Gerhard Burger
              Jul 5 '13 at 6:36












              /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
              – Mark Stewart
              Nov 21 at 0:44




              /usr/local/bin is a semi-common location for software that might be not commonly used by a user/company.
              – Mark Stewart
              Nov 21 at 0:44












              up vote
              74
              down vote













              EDIT: See also d4nyll's answer below for an excellent and beginner-friendly map!



              Read my answer below for more info on what the PATH environment variable is, what .desktop files are, and how to find a specific program using various linux commands.



              Original answer:





              There is no easy answer.




              /bin,/usr/bin, and /usr/share



              As mentioned in the other answers, you can find most executables under /bin or /usr/bin, and the support files are installed in /usr/share.




              /usr/local and /opt



              There are however more directories in which Ubuntu installs applications. The PATH variable, which determines where to search for an entered command, might give you a clue, mine looks like (echo $PATH in a terminal):



              /usr/local/cuda/bin:/usr/local/texlive/2012/bin/x86_64-linux:/usr/games:/home/gerhard/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


              As you can see some software is installed in /usr/local and have their own directory and bin. Another place where many programs are installed is /opt. The properties of these locations are explained by the Filesystem Hierarchy Standard, which is a very good read. Unfortunately, the difference between /opt and /usr/local is not very well explained, someone on the unix stackexchange had a more elaborate explanation:





              • /usr/local is a place to install files built by the administrator, usually by using the make command. The idea is to avoid clashes with files that are part of the operating systems that would either be overwritten or overwrite the local ones otherwise. eg. /usr/bin/foo is part of the OS while /usr/local/bin/foo is a local alternative,


              • /opt is a directory to install unbundled packages each in their own subdirectory. They are already built whole packages provided by an independent third party software distributor. For example someapp would be installed in /opt/someapp, one of its command would be in /opt/someapp/bin/foo [and then usually a symbolic link is made in one of the bin directories in the PATH, or the program is called from a desktop file (see below)].




              Finding a specific program or command




              .desktop files



              To find out where a specific program is installed, you can do a number of steps. First you need to locate its .desktop file. Desktop files are simular to shortcuts in Windows, and for system applications they are located in /usr/share/applications. The desktop files for applications that are only available for the current user are in ~/.local/share/applications. Take for example Google Chrome, which has the desktop file /usr/share/applications/google-chrome.desktop and look for the line that starts with Exec=, this determines how to start Google Chrome. It says:



              Exec=/opt/google/chrome/google-chrome


              So you know Google Chrome is in /opt.



              Now for Mozilla Firefox which is located in /usr/share/applications/firefox.desktop. It simply says



              Exec=firefox %u


              At first this doesn't seem to help that much, but then you realize that firefox must be in a directory that is in the PATH variable (most likely a bin), and we can look it up (see below).



              Looking up commands



              To look up commands you can use one or more of the following: type, which and whereis (I've included a link to their manual pages online).





              • type: it describes a command, and indicates how it would be interpreted if used as a command name. Possible types for a command are:




                1. alias (shell alias)

                2. function (shell function)

                3. builtin (shell builtin)

                4. file (disk file)

                5. keyword (shell reserved word)


                (type itself is a shell builtin, try it with type type :P)



                Executing type firefox gives us



                firefox is /usr/bin/firefox


                which is what we wanted to know




              If a command is a file (which you checked with type) you can then also use:





              • which: shows the full path of the command,



                Executing which firefox gives us



                 /usr/bin/firefox



              • whereis: locate the binary, source, and manual page files for a command.



                Executing whereis firefox gives us



                firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz



              Bonus



              You can inspect /usr/bin/firefox closer with ls -l /usr/bin/firefox and this gives:



              /usr/bin/firefox -> ../lib/firefox/firefox.sh*


              It appears that /usr/bin/firefox is 'only' a symbolic link to the script /usr/lib/firefox/firefox.sh. If you inspect the script you discover that the script calls /usr/lib/firefox/firefox.

              You may rest in peace now :)






              share|improve this answer























              • Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
                – Quazi Irfan
                Jun 2 '15 at 23:35












              • @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
                – Gerhard Burger
                Jun 3 '15 at 5:37












              • Why would someone use .desktop file over symbolic links and vice versa?
                – Quazi Irfan
                Jun 3 '15 at 10:48






              • 1




                @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
                – Gerhard Burger
                Jun 3 '15 at 11:54















              up vote
              74
              down vote













              EDIT: See also d4nyll's answer below for an excellent and beginner-friendly map!



              Read my answer below for more info on what the PATH environment variable is, what .desktop files are, and how to find a specific program using various linux commands.



              Original answer:





              There is no easy answer.




              /bin,/usr/bin, and /usr/share



              As mentioned in the other answers, you can find most executables under /bin or /usr/bin, and the support files are installed in /usr/share.




              /usr/local and /opt



              There are however more directories in which Ubuntu installs applications. The PATH variable, which determines where to search for an entered command, might give you a clue, mine looks like (echo $PATH in a terminal):



              /usr/local/cuda/bin:/usr/local/texlive/2012/bin/x86_64-linux:/usr/games:/home/gerhard/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


              As you can see some software is installed in /usr/local and have their own directory and bin. Another place where many programs are installed is /opt. The properties of these locations are explained by the Filesystem Hierarchy Standard, which is a very good read. Unfortunately, the difference between /opt and /usr/local is not very well explained, someone on the unix stackexchange had a more elaborate explanation:





              • /usr/local is a place to install files built by the administrator, usually by using the make command. The idea is to avoid clashes with files that are part of the operating systems that would either be overwritten or overwrite the local ones otherwise. eg. /usr/bin/foo is part of the OS while /usr/local/bin/foo is a local alternative,


              • /opt is a directory to install unbundled packages each in their own subdirectory. They are already built whole packages provided by an independent third party software distributor. For example someapp would be installed in /opt/someapp, one of its command would be in /opt/someapp/bin/foo [and then usually a symbolic link is made in one of the bin directories in the PATH, or the program is called from a desktop file (see below)].




              Finding a specific program or command




              .desktop files



              To find out where a specific program is installed, you can do a number of steps. First you need to locate its .desktop file. Desktop files are simular to shortcuts in Windows, and for system applications they are located in /usr/share/applications. The desktop files for applications that are only available for the current user are in ~/.local/share/applications. Take for example Google Chrome, which has the desktop file /usr/share/applications/google-chrome.desktop and look for the line that starts with Exec=, this determines how to start Google Chrome. It says:



              Exec=/opt/google/chrome/google-chrome


              So you know Google Chrome is in /opt.



              Now for Mozilla Firefox which is located in /usr/share/applications/firefox.desktop. It simply says



              Exec=firefox %u


              At first this doesn't seem to help that much, but then you realize that firefox must be in a directory that is in the PATH variable (most likely a bin), and we can look it up (see below).



              Looking up commands



              To look up commands you can use one or more of the following: type, which and whereis (I've included a link to their manual pages online).





              • type: it describes a command, and indicates how it would be interpreted if used as a command name. Possible types for a command are:




                1. alias (shell alias)

                2. function (shell function)

                3. builtin (shell builtin)

                4. file (disk file)

                5. keyword (shell reserved word)


                (type itself is a shell builtin, try it with type type :P)



                Executing type firefox gives us



                firefox is /usr/bin/firefox


                which is what we wanted to know




              If a command is a file (which you checked with type) you can then also use:





              • which: shows the full path of the command,



                Executing which firefox gives us



                 /usr/bin/firefox



              • whereis: locate the binary, source, and manual page files for a command.



                Executing whereis firefox gives us



                firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz



              Bonus



              You can inspect /usr/bin/firefox closer with ls -l /usr/bin/firefox and this gives:



              /usr/bin/firefox -> ../lib/firefox/firefox.sh*


              It appears that /usr/bin/firefox is 'only' a symbolic link to the script /usr/lib/firefox/firefox.sh. If you inspect the script you discover that the script calls /usr/lib/firefox/firefox.

              You may rest in peace now :)






              share|improve this answer























              • Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
                – Quazi Irfan
                Jun 2 '15 at 23:35












              • @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
                – Gerhard Burger
                Jun 3 '15 at 5:37












              • Why would someone use .desktop file over symbolic links and vice versa?
                – Quazi Irfan
                Jun 3 '15 at 10:48






              • 1




                @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
                – Gerhard Burger
                Jun 3 '15 at 11:54













              up vote
              74
              down vote










              up vote
              74
              down vote









              EDIT: See also d4nyll's answer below for an excellent and beginner-friendly map!



              Read my answer below for more info on what the PATH environment variable is, what .desktop files are, and how to find a specific program using various linux commands.



              Original answer:





              There is no easy answer.




              /bin,/usr/bin, and /usr/share



              As mentioned in the other answers, you can find most executables under /bin or /usr/bin, and the support files are installed in /usr/share.




              /usr/local and /opt



              There are however more directories in which Ubuntu installs applications. The PATH variable, which determines where to search for an entered command, might give you a clue, mine looks like (echo $PATH in a terminal):



              /usr/local/cuda/bin:/usr/local/texlive/2012/bin/x86_64-linux:/usr/games:/home/gerhard/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


              As you can see some software is installed in /usr/local and have their own directory and bin. Another place where many programs are installed is /opt. The properties of these locations are explained by the Filesystem Hierarchy Standard, which is a very good read. Unfortunately, the difference between /opt and /usr/local is not very well explained, someone on the unix stackexchange had a more elaborate explanation:





              • /usr/local is a place to install files built by the administrator, usually by using the make command. The idea is to avoid clashes with files that are part of the operating systems that would either be overwritten or overwrite the local ones otherwise. eg. /usr/bin/foo is part of the OS while /usr/local/bin/foo is a local alternative,


              • /opt is a directory to install unbundled packages each in their own subdirectory. They are already built whole packages provided by an independent third party software distributor. For example someapp would be installed in /opt/someapp, one of its command would be in /opt/someapp/bin/foo [and then usually a symbolic link is made in one of the bin directories in the PATH, or the program is called from a desktop file (see below)].




              Finding a specific program or command




              .desktop files



              To find out where a specific program is installed, you can do a number of steps. First you need to locate its .desktop file. Desktop files are simular to shortcuts in Windows, and for system applications they are located in /usr/share/applications. The desktop files for applications that are only available for the current user are in ~/.local/share/applications. Take for example Google Chrome, which has the desktop file /usr/share/applications/google-chrome.desktop and look for the line that starts with Exec=, this determines how to start Google Chrome. It says:



              Exec=/opt/google/chrome/google-chrome


              So you know Google Chrome is in /opt.



              Now for Mozilla Firefox which is located in /usr/share/applications/firefox.desktop. It simply says



              Exec=firefox %u


              At first this doesn't seem to help that much, but then you realize that firefox must be in a directory that is in the PATH variable (most likely a bin), and we can look it up (see below).



              Looking up commands



              To look up commands you can use one or more of the following: type, which and whereis (I've included a link to their manual pages online).





              • type: it describes a command, and indicates how it would be interpreted if used as a command name. Possible types for a command are:




                1. alias (shell alias)

                2. function (shell function)

                3. builtin (shell builtin)

                4. file (disk file)

                5. keyword (shell reserved word)


                (type itself is a shell builtin, try it with type type :P)



                Executing type firefox gives us



                firefox is /usr/bin/firefox


                which is what we wanted to know




              If a command is a file (which you checked with type) you can then also use:





              • which: shows the full path of the command,



                Executing which firefox gives us



                 /usr/bin/firefox



              • whereis: locate the binary, source, and manual page files for a command.



                Executing whereis firefox gives us



                firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz



              Bonus



              You can inspect /usr/bin/firefox closer with ls -l /usr/bin/firefox and this gives:



              /usr/bin/firefox -> ../lib/firefox/firefox.sh*


              It appears that /usr/bin/firefox is 'only' a symbolic link to the script /usr/lib/firefox/firefox.sh. If you inspect the script you discover that the script calls /usr/lib/firefox/firefox.

              You may rest in peace now :)






              share|improve this answer














              EDIT: See also d4nyll's answer below for an excellent and beginner-friendly map!



              Read my answer below for more info on what the PATH environment variable is, what .desktop files are, and how to find a specific program using various linux commands.



              Original answer:





              There is no easy answer.




              /bin,/usr/bin, and /usr/share



              As mentioned in the other answers, you can find most executables under /bin or /usr/bin, and the support files are installed in /usr/share.




              /usr/local and /opt



              There are however more directories in which Ubuntu installs applications. The PATH variable, which determines where to search for an entered command, might give you a clue, mine looks like (echo $PATH in a terminal):



              /usr/local/cuda/bin:/usr/local/texlive/2012/bin/x86_64-linux:/usr/games:/home/gerhard/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


              As you can see some software is installed in /usr/local and have their own directory and bin. Another place where many programs are installed is /opt. The properties of these locations are explained by the Filesystem Hierarchy Standard, which is a very good read. Unfortunately, the difference between /opt and /usr/local is not very well explained, someone on the unix stackexchange had a more elaborate explanation:





              • /usr/local is a place to install files built by the administrator, usually by using the make command. The idea is to avoid clashes with files that are part of the operating systems that would either be overwritten or overwrite the local ones otherwise. eg. /usr/bin/foo is part of the OS while /usr/local/bin/foo is a local alternative,


              • /opt is a directory to install unbundled packages each in their own subdirectory. They are already built whole packages provided by an independent third party software distributor. For example someapp would be installed in /opt/someapp, one of its command would be in /opt/someapp/bin/foo [and then usually a symbolic link is made in one of the bin directories in the PATH, or the program is called from a desktop file (see below)].




              Finding a specific program or command




              .desktop files



              To find out where a specific program is installed, you can do a number of steps. First you need to locate its .desktop file. Desktop files are simular to shortcuts in Windows, and for system applications they are located in /usr/share/applications. The desktop files for applications that are only available for the current user are in ~/.local/share/applications. Take for example Google Chrome, which has the desktop file /usr/share/applications/google-chrome.desktop and look for the line that starts with Exec=, this determines how to start Google Chrome. It says:



              Exec=/opt/google/chrome/google-chrome


              So you know Google Chrome is in /opt.



              Now for Mozilla Firefox which is located in /usr/share/applications/firefox.desktop. It simply says



              Exec=firefox %u


              At first this doesn't seem to help that much, but then you realize that firefox must be in a directory that is in the PATH variable (most likely a bin), and we can look it up (see below).



              Looking up commands



              To look up commands you can use one or more of the following: type, which and whereis (I've included a link to their manual pages online).





              • type: it describes a command, and indicates how it would be interpreted if used as a command name. Possible types for a command are:




                1. alias (shell alias)

                2. function (shell function)

                3. builtin (shell builtin)

                4. file (disk file)

                5. keyword (shell reserved word)


                (type itself is a shell builtin, try it with type type :P)



                Executing type firefox gives us



                firefox is /usr/bin/firefox


                which is what we wanted to know




              If a command is a file (which you checked with type) you can then also use:





              • which: shows the full path of the command,



                Executing which firefox gives us



                 /usr/bin/firefox



              • whereis: locate the binary, source, and manual page files for a command.



                Executing whereis firefox gives us



                firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/lib64/firefox /usr/bin/X11/firefox /usr/share/man/man1/firefox.1.gz



              Bonus



              You can inspect /usr/bin/firefox closer with ls -l /usr/bin/firefox and this gives:



              /usr/bin/firefox -> ../lib/firefox/firefox.sh*


              It appears that /usr/bin/firefox is 'only' a symbolic link to the script /usr/lib/firefox/firefox.sh. If you inspect the script you discover that the script calls /usr/lib/firefox/firefox.

              You may rest in peace now :)







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 20 at 20:59

























              answered May 12 '13 at 19:49









              Gerhard Burger

              7,14833056




              7,14833056












              • Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
                – Quazi Irfan
                Jun 2 '15 at 23:35












              • @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
                – Gerhard Burger
                Jun 3 '15 at 5:37












              • Why would someone use .desktop file over symbolic links and vice versa?
                – Quazi Irfan
                Jun 3 '15 at 10:48






              • 1




                @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
                – Gerhard Burger
                Jun 3 '15 at 11:54


















              • Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
                – Quazi Irfan
                Jun 2 '15 at 23:35












              • @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
                – Gerhard Burger
                Jun 3 '15 at 5:37












              • Why would someone use .desktop file over symbolic links and vice versa?
                – Quazi Irfan
                Jun 3 '15 at 10:48






              • 1




                @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
                – Gerhard Burger
                Jun 3 '15 at 11:54
















              Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
              – Quazi Irfan
              Jun 2 '15 at 23:35






              Pretty cool answer. One question, what is Symbolic Link? Is it Windows shortcut equivalent?
              – Quazi Irfan
              Jun 2 '15 at 23:35














              @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
              – Gerhard Burger
              Jun 3 '15 at 5:37






              @iamcreasy thanks! Yes, they are a sort of shortcut, but with the main intention of avoiding file copies. The windows shortcuts are more comparable to. desktop files, which can be used to create, for example, startmenu items.
              – Gerhard Burger
              Jun 3 '15 at 5:37














              Why would someone use .desktop file over symbolic links and vice versa?
              – Quazi Irfan
              Jun 3 '15 at 10:48




              Why would someone use .desktop file over symbolic links and vice versa?
              – Quazi Irfan
              Jun 3 '15 at 10:48




              1




              1




              @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
              – Gerhard Burger
              Jun 3 '15 at 11:54




              @iamcreasy In .desktop files you can add extra information, such as a description and an icon (see an example here: standards.freedesktop.org/desktop-entry-spec/latest/apa.html), it's a 'regular' file. A symbolic link is a 'special' file that only links to another file. I find this hard to explain properly but maybe you can find a better answer here: superuser.com/questions/253935/…
              – Gerhard Burger
              Jun 3 '15 at 11:54










              up vote
              66
              down vote













              Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.








              share|improve this answer



















              • 4




                this answer is ignored it should be at the top.
                – voldemort
                May 17 '17 at 13:27















              up vote
              66
              down vote













              Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.








              share|improve this answer



















              • 4




                this answer is ignored it should be at the top.
                – voldemort
                May 17 '17 at 13:27













              up vote
              66
              down vote










              up vote
              66
              down vote









              Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.








              share|improve this answer














              Late Answer - I've created a roadmap for beginners to follow. If they are looking for a file but don't know where to look, they can use the map to roughly navigate around. You can download a hi-res PNG here. You can find the related post here. I will keep updating both the file and the post when time permits, incorporating helpful comments.









              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 6 '15 at 15:34









              Wilf

              21k1066128




              21k1066128










              answered Nov 20 '14 at 18:25









              d4nyll

              1,225912




              1,225912








              • 4




                this answer is ignored it should be at the top.
                – voldemort
                May 17 '17 at 13:27














              • 4




                this answer is ignored it should be at the top.
                – voldemort
                May 17 '17 at 13:27








              4




              4




              this answer is ignored it should be at the top.
              – voldemort
              May 17 '17 at 13:27




              this answer is ignored it should be at the top.
              – voldemort
              May 17 '17 at 13:27










              up vote
              17
              down vote













              There is no single directory that is the exact equivalent of Program Files folder. The way Linux arranges things is a lot different than Windows.



              In windows, every program that we install gets its own directory inside the Program Files directory. In that directory, further sub-directories are created for different kind of files. There is no fixed structure for sub-directories. Programs decide for themselves what they want to call each directory and where they want to put what.



              But in Linux when a program is installed, different kind of files are copied to different locations. Executables are copied to /usr/bin, library files to /usr/lib, documentation to one or more of /usr/man, /usr/info and /usr/doc. If there are configuration files, they are usually in the user's home directory or in /etc.






              share|improve this answer





















              • Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
                – jojman
                Nov 17 '16 at 23:58






              • 1




                not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
                – binW
                Nov 23 '16 at 15:27















              up vote
              17
              down vote













              There is no single directory that is the exact equivalent of Program Files folder. The way Linux arranges things is a lot different than Windows.



              In windows, every program that we install gets its own directory inside the Program Files directory. In that directory, further sub-directories are created for different kind of files. There is no fixed structure for sub-directories. Programs decide for themselves what they want to call each directory and where they want to put what.



              But in Linux when a program is installed, different kind of files are copied to different locations. Executables are copied to /usr/bin, library files to /usr/lib, documentation to one or more of /usr/man, /usr/info and /usr/doc. If there are configuration files, they are usually in the user's home directory or in /etc.






              share|improve this answer





















              • Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
                – jojman
                Nov 17 '16 at 23:58






              • 1




                not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
                – binW
                Nov 23 '16 at 15:27













              up vote
              17
              down vote










              up vote
              17
              down vote









              There is no single directory that is the exact equivalent of Program Files folder. The way Linux arranges things is a lot different than Windows.



              In windows, every program that we install gets its own directory inside the Program Files directory. In that directory, further sub-directories are created for different kind of files. There is no fixed structure for sub-directories. Programs decide for themselves what they want to call each directory and where they want to put what.



              But in Linux when a program is installed, different kind of files are copied to different locations. Executables are copied to /usr/bin, library files to /usr/lib, documentation to one or more of /usr/man, /usr/info and /usr/doc. If there are configuration files, they are usually in the user's home directory or in /etc.






              share|improve this answer












              There is no single directory that is the exact equivalent of Program Files folder. The way Linux arranges things is a lot different than Windows.



              In windows, every program that we install gets its own directory inside the Program Files directory. In that directory, further sub-directories are created for different kind of files. There is no fixed structure for sub-directories. Programs decide for themselves what they want to call each directory and where they want to put what.



              But in Linux when a program is installed, different kind of files are copied to different locations. Executables are copied to /usr/bin, library files to /usr/lib, documentation to one or more of /usr/man, /usr/info and /usr/doc. If there are configuration files, they are usually in the user's home directory or in /etc.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 24 '11 at 15:19









              binW

              9,35263961




              9,35263961












              • Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
                – jojman
                Nov 17 '16 at 23:58






              • 1




                not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
                – binW
                Nov 23 '16 at 15:27


















              • Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
                – jojman
                Nov 17 '16 at 23:58






              • 1




                not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
                – binW
                Nov 23 '16 at 15:27
















              Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
              – jojman
              Nov 17 '16 at 23:58




              Is there any reason for this grouping of files based on their purpose rather than based on the application the files belong to? Is the "Unix file grouping style" generally more convenient from a system administrator perspective?
              – jojman
              Nov 17 '16 at 23:58




              1




              1




              not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
              – binW
              Nov 23 '16 at 15:27




              not really. Its a design choice that they made I think. Although it does enable making utilities like "man", "info" or many others which depend on this file structure. For example "man" knows where to look for documentation for each command. If there is no standard location of docs, man can't work.
              – binW
              Nov 23 '16 at 15:27










              up vote
              10
              down vote













              The C:Program Files folder would be /usr/bin in Ubuntu. /bin looks more like C:windows.



              From the manual page of the filesystem hierarchy:



              /bin      This directory contains executable programs which are needed  in
              single user mode and to bring the system up or repair it.
              /usr/bin
              This is the primary directory for executable programs. 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.


              Ubuntu has a different structure than windows. Ubuntu places almost all applications in one directory, say /usr/bin. Windows would make a new folder, say Mozilla Firefox, and add configuration, executables, DLL's, images, etc. in it. Ubuntu splits them up, executables go in /usr/bin, system-wide configuration in /etc, shared objects in /usr/lib, images in /usr/share, ...






              share|improve this answer

























                up vote
                10
                down vote













                The C:Program Files folder would be /usr/bin in Ubuntu. /bin looks more like C:windows.



                From the manual page of the filesystem hierarchy:



                /bin      This directory contains executable programs which are needed  in
                single user mode and to bring the system up or repair it.
                /usr/bin
                This is the primary directory for executable programs. 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.


                Ubuntu has a different structure than windows. Ubuntu places almost all applications in one directory, say /usr/bin. Windows would make a new folder, say Mozilla Firefox, and add configuration, executables, DLL's, images, etc. in it. Ubuntu splits them up, executables go in /usr/bin, system-wide configuration in /etc, shared objects in /usr/lib, images in /usr/share, ...






                share|improve this answer























                  up vote
                  10
                  down vote










                  up vote
                  10
                  down vote









                  The C:Program Files folder would be /usr/bin in Ubuntu. /bin looks more like C:windows.



                  From the manual page of the filesystem hierarchy:



                  /bin      This directory contains executable programs which are needed  in
                  single user mode and to bring the system up or repair it.
                  /usr/bin
                  This is the primary directory for executable programs. 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.


                  Ubuntu has a different structure than windows. Ubuntu places almost all applications in one directory, say /usr/bin. Windows would make a new folder, say Mozilla Firefox, and add configuration, executables, DLL's, images, etc. in it. Ubuntu splits them up, executables go in /usr/bin, system-wide configuration in /etc, shared objects in /usr/lib, images in /usr/share, ...






                  share|improve this answer












                  The C:Program Files folder would be /usr/bin in Ubuntu. /bin looks more like C:windows.



                  From the manual page of the filesystem hierarchy:



                  /bin      This directory contains executable programs which are needed  in
                  single user mode and to bring the system up or repair it.
                  /usr/bin
                  This is the primary directory for executable programs. 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.


                  Ubuntu has a different structure than windows. Ubuntu places almost all applications in one directory, say /usr/bin. Windows would make a new folder, say Mozilla Firefox, and add configuration, executables, DLL's, images, etc. in it. Ubuntu splits them up, executables go in /usr/bin, system-wide configuration in /etc, shared objects in /usr/lib, images in /usr/share, ...







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 20 '11 at 14:42









                  Lekensteyn

                  119k47262354




                  119k47262354






















                      up vote
                      4
                      down vote













                      Linux 'Program Files' are in the whole hierarchy. It could be on /usr/bin, /bin, /opt/..., or in another directories.



                      I think you are going to find some file related to your application. Then, I have an idea on how to looks files which are installed on program installation.




                      1. Install synaptic by issuing sudo apt-get install synaptic on terminal.

                      2. Look for package you want, search on the search text input.

                      3. Right-click the package and select Properties.

                      4. Move to Installed File tab. The result is same as dpkg -L package_name.

                      5. There you'll find all files installed for the package.


                      It is because linux move the installed file to directories separately based on their type.




                      • Executable goes to /usr/bin or /bin.

                      • Icon goes to /usr/share/icons or on ~/.local/share/icons for local.

                      • Whole application (portable) on /opt.

                      • Shortcut usually on /usr/share/applications or on ~/.local/share/applications

                      • Documentation on /usr/share/doc

                      • Library / module on /usr/lib


                      And many other directories. (CMIIW, accepting correction)






                      share|improve this answer



























                        up vote
                        4
                        down vote













                        Linux 'Program Files' are in the whole hierarchy. It could be on /usr/bin, /bin, /opt/..., or in another directories.



                        I think you are going to find some file related to your application. Then, I have an idea on how to looks files which are installed on program installation.




                        1. Install synaptic by issuing sudo apt-get install synaptic on terminal.

                        2. Look for package you want, search on the search text input.

                        3. Right-click the package and select Properties.

                        4. Move to Installed File tab. The result is same as dpkg -L package_name.

                        5. There you'll find all files installed for the package.


                        It is because linux move the installed file to directories separately based on their type.




                        • Executable goes to /usr/bin or /bin.

                        • Icon goes to /usr/share/icons or on ~/.local/share/icons for local.

                        • Whole application (portable) on /opt.

                        • Shortcut usually on /usr/share/applications or on ~/.local/share/applications

                        • Documentation on /usr/share/doc

                        • Library / module on /usr/lib


                        And many other directories. (CMIIW, accepting correction)






                        share|improve this answer

























                          up vote
                          4
                          down vote










                          up vote
                          4
                          down vote









                          Linux 'Program Files' are in the whole hierarchy. It could be on /usr/bin, /bin, /opt/..., or in another directories.



                          I think you are going to find some file related to your application. Then, I have an idea on how to looks files which are installed on program installation.




                          1. Install synaptic by issuing sudo apt-get install synaptic on terminal.

                          2. Look for package you want, search on the search text input.

                          3. Right-click the package and select Properties.

                          4. Move to Installed File tab. The result is same as dpkg -L package_name.

                          5. There you'll find all files installed for the package.


                          It is because linux move the installed file to directories separately based on their type.




                          • Executable goes to /usr/bin or /bin.

                          • Icon goes to /usr/share/icons or on ~/.local/share/icons for local.

                          • Whole application (portable) on /opt.

                          • Shortcut usually on /usr/share/applications or on ~/.local/share/applications

                          • Documentation on /usr/share/doc

                          • Library / module on /usr/lib


                          And many other directories. (CMIIW, accepting correction)






                          share|improve this answer














                          Linux 'Program Files' are in the whole hierarchy. It could be on /usr/bin, /bin, /opt/..., or in another directories.



                          I think you are going to find some file related to your application. Then, I have an idea on how to looks files which are installed on program installation.




                          1. Install synaptic by issuing sudo apt-get install synaptic on terminal.

                          2. Look for package you want, search on the search text input.

                          3. Right-click the package and select Properties.

                          4. Move to Installed File tab. The result is same as dpkg -L package_name.

                          5. There you'll find all files installed for the package.


                          It is because linux move the installed file to directories separately based on their type.




                          • Executable goes to /usr/bin or /bin.

                          • Icon goes to /usr/share/icons or on ~/.local/share/icons for local.

                          • Whole application (portable) on /opt.

                          • Shortcut usually on /usr/share/applications or on ~/.local/share/applications

                          • Documentation on /usr/share/doc

                          • Library / module on /usr/lib


                          And many other directories. (CMIIW, accepting correction)







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jun 3 '15 at 0:14









                          Quazi Irfan

                          4571618




                          4571618










                          answered Mar 15 '14 at 14:09









                          Abdillah

                          586212




                          586212






















                              up vote
                              3
                              down vote













                              In this answer when I say Unix I mean Unix as well as Unix-like operating systems.



                              Ubuntu doesn't really have a programs folder containing all of the data for each program. In Unix and Unix-like operating systems, EVERYTHING is a file, even the terminal commands. They're files as well. The way Unix handles programs can be pretty chaotic, and organized at the same time.



                              Icons for programs are stored in /usr/share/icons/*, program executables are usually stored in /usr/bin, /bin, and other places with bin directories (bin is obv short for binary). Libraries that programs depend on are in /lib.



                              So you end up with not a directory containing all of the data for one program, but the data for the program spread out. While at first this seems very disorganized, it allows for sharing of standard things like libraries and icons.



                              Thanks to permissions for each file, the idea of everything being a file is very brilliant to be honest. It makes Unix MUCH more secure than other operating systems.






                              share|improve this answer

























                                up vote
                                3
                                down vote













                                In this answer when I say Unix I mean Unix as well as Unix-like operating systems.



                                Ubuntu doesn't really have a programs folder containing all of the data for each program. In Unix and Unix-like operating systems, EVERYTHING is a file, even the terminal commands. They're files as well. The way Unix handles programs can be pretty chaotic, and organized at the same time.



                                Icons for programs are stored in /usr/share/icons/*, program executables are usually stored in /usr/bin, /bin, and other places with bin directories (bin is obv short for binary). Libraries that programs depend on are in /lib.



                                So you end up with not a directory containing all of the data for one program, but the data for the program spread out. While at first this seems very disorganized, it allows for sharing of standard things like libraries and icons.



                                Thanks to permissions for each file, the idea of everything being a file is very brilliant to be honest. It makes Unix MUCH more secure than other operating systems.






                                share|improve this answer























                                  up vote
                                  3
                                  down vote










                                  up vote
                                  3
                                  down vote









                                  In this answer when I say Unix I mean Unix as well as Unix-like operating systems.



                                  Ubuntu doesn't really have a programs folder containing all of the data for each program. In Unix and Unix-like operating systems, EVERYTHING is a file, even the terminal commands. They're files as well. The way Unix handles programs can be pretty chaotic, and organized at the same time.



                                  Icons for programs are stored in /usr/share/icons/*, program executables are usually stored in /usr/bin, /bin, and other places with bin directories (bin is obv short for binary). Libraries that programs depend on are in /lib.



                                  So you end up with not a directory containing all of the data for one program, but the data for the program spread out. While at first this seems very disorganized, it allows for sharing of standard things like libraries and icons.



                                  Thanks to permissions for each file, the idea of everything being a file is very brilliant to be honest. It makes Unix MUCH more secure than other operating systems.






                                  share|improve this answer












                                  In this answer when I say Unix I mean Unix as well as Unix-like operating systems.



                                  Ubuntu doesn't really have a programs folder containing all of the data for each program. In Unix and Unix-like operating systems, EVERYTHING is a file, even the terminal commands. They're files as well. The way Unix handles programs can be pretty chaotic, and organized at the same time.



                                  Icons for programs are stored in /usr/share/icons/*, program executables are usually stored in /usr/bin, /bin, and other places with bin directories (bin is obv short for binary). Libraries that programs depend on are in /lib.



                                  So you end up with not a directory containing all of the data for one program, but the data for the program spread out. While at first this seems very disorganized, it allows for sharing of standard things like libraries and icons.



                                  Thanks to permissions for each file, the idea of everything being a file is very brilliant to be honest. It makes Unix MUCH more secure than other operating systems.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Feb 20 '11 at 19:25









                                  Thomas Boxley

                                  1,70712343




                                  1,70712343






















                                      up vote
                                      3
                                      down vote













                                      The way that Linux and Windows programs are installed is quite different.



                                      The common pattern in Windows is for a program; or a bunch of programs, from one vendor go into its own sub directory in C:programsvendor or something similar.



                                      In Linux, your files are split up between specific sub directories depending on their function. There are directories for libraries, icons, man pages, Log files, configuration and so on. You may use some of them, but the system will manage all of them. They are not coupled together, but exist together with similar files from other programs.



                                      So there is no real equivalent to that Windows directory structure in a regular Linux implementation.






                                      share|improve this answer



























                                        up vote
                                        3
                                        down vote













                                        The way that Linux and Windows programs are installed is quite different.



                                        The common pattern in Windows is for a program; or a bunch of programs, from one vendor go into its own sub directory in C:programsvendor or something similar.



                                        In Linux, your files are split up between specific sub directories depending on their function. There are directories for libraries, icons, man pages, Log files, configuration and so on. You may use some of them, but the system will manage all of them. They are not coupled together, but exist together with similar files from other programs.



                                        So there is no real equivalent to that Windows directory structure in a regular Linux implementation.






                                        share|improve this answer

























                                          up vote
                                          3
                                          down vote










                                          up vote
                                          3
                                          down vote









                                          The way that Linux and Windows programs are installed is quite different.



                                          The common pattern in Windows is for a program; or a bunch of programs, from one vendor go into its own sub directory in C:programsvendor or something similar.



                                          In Linux, your files are split up between specific sub directories depending on their function. There are directories for libraries, icons, man pages, Log files, configuration and so on. You may use some of them, but the system will manage all of them. They are not coupled together, but exist together with similar files from other programs.



                                          So there is no real equivalent to that Windows directory structure in a regular Linux implementation.






                                          share|improve this answer














                                          The way that Linux and Windows programs are installed is quite different.



                                          The common pattern in Windows is for a program; or a bunch of programs, from one vendor go into its own sub directory in C:programsvendor or something similar.



                                          In Linux, your files are split up between specific sub directories depending on their function. There are directories for libraries, icons, man pages, Log files, configuration and so on. You may use some of them, but the system will manage all of them. They are not coupled together, but exist together with similar files from other programs.



                                          So there is no real equivalent to that Windows directory structure in a regular Linux implementation.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Nov 3 '15 at 3:51

























                                          answered Feb 20 '11 at 14:36









                                          user unknown

                                          4,85122151




                                          4,85122151






















                                              up vote
                                              2
                                              down vote













                                              If you install own programmes, I recommend 1 folder:




                                              • /opt






                                              share|improve this answer

























                                                up vote
                                                2
                                                down vote













                                                If you install own programmes, I recommend 1 folder:




                                                • /opt






                                                share|improve this answer























                                                  up vote
                                                  2
                                                  down vote










                                                  up vote
                                                  2
                                                  down vote









                                                  If you install own programmes, I recommend 1 folder:




                                                  • /opt






                                                  share|improve this answer












                                                  If you install own programmes, I recommend 1 folder:




                                                  • /opt







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Mar 12 '15 at 19:27









                                                  Timo

                                                  1716




                                                  1716






















                                                      up vote
                                                      -2
                                                      down vote













                                                      Look in /bin, /usr/bin, and anything else that says bin.






                                                      share|improve this answer



























                                                        up vote
                                                        -2
                                                        down vote













                                                        Look in /bin, /usr/bin, and anything else that says bin.






                                                        share|improve this answer

























                                                          up vote
                                                          -2
                                                          down vote










                                                          up vote
                                                          -2
                                                          down vote









                                                          Look in /bin, /usr/bin, and anything else that says bin.






                                                          share|improve this answer














                                                          Look in /bin, /usr/bin, and anything else that says bin.







                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited May 12 '13 at 20:33









                                                          Seth

                                                          33.5k26109159




                                                          33.5k26109159










                                                          answered May 12 '13 at 19:36









                                                          cpu2

                                                          674




                                                          674

















                                                              protected by Braiam May 24 '15 at 14:56



                                                              Thank you for your interest in this question.
                                                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                              Would you like to answer one of these unanswered questions instead?



                                                              Popular posts from this blog

                                                              How to change which sound is reproduced for terminal bell?

                                                              Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents