Where do programs install to in linux

Where is Ubuntu storing installed programs?

I am using Ubuntu and when I click on a program to download Firefox asks me «What should firefox do with this file?» And in the «Open with» I would like to find a program «Package installer». The problem is — I don’t know where to look for. Where is the program stored (I installed it using Ubuntu Software Center)

8 Answers 8

They are usually stored in the following folders:

If you’re not sure, use the which command:

~$ which firefox /usr/bin/firefox 

If you installed the package with the Ubuntu package manager (apt, synaptic, dpkg or similar), you can get information about the installed package with

Is it possible to do a search if I don’t know exact name of the program. i’m asking because the name of the program is «Package installer», therefore I tried with «package_installer», «package-installer», «package», and I can’t find it

dpkg -l lists all installed packages. You can use something like dpkg -l | grep package and than use dpkg -L . Nevertheless it is strange to add packages the way you are doing it. Typically this is done with the help of tools which are mostly always installed when using Ubuntu like apt-get or synaptic .

@Dantes If you write dpkg -L p and press tab, it will show you the name of packages that starts with p installed on your system.

for some applications, for example google chrome, they store it under /opt. you can follow the above instruction using dpkg -l to get the correct naming then dpkg -L to get the detail.

Just for an addition reference to the above answers. I can not use dpkg -L to find the correct path for cuda. See the results I got from dpkg -L

$ dpkg -L cuda /. /usr /usr/share /usr/share/doc /usr/share/doc/cuda /usr/share/doc/cuda/copyright /usr/share/doc/cuda/changelog.Debian.gz 

the correct path is /usr/local/cuda

$ ll /usr/local | grep cuda lrwxrwxrwx 1 root root 8 Oct 20 18:45 cuda -> cuda-9.0/ drwxr-xr-x 15 root root 4096 Oct 20 18:44 cuda-9.0/ 

Btw, I did install cuda by the command of

Источник

Where to install programs

I understand that I have the /computer/usr/share path as well as the /computer/opt path. I noticed sometimes, like with programs such as Google Chrome and Teamviewer, they automatically installed themselves in my /computer/opt directory. However, for programs such as VSCode, I had to manually move the tar.gz file into my /opt directory, and then extract there. Why do some programs do this automatically, while others have to be done manually? Also, when installing programs, what is the best directory to install them in? (i.e. what is the Linux equivalent to Program Files (x86) for Windows?) Thank you.

Читайте также:  Linux как посмотреть mac адрес

Perhaps this link will help: help.ubuntu.com/community/LinuxFilesystemTreeOverview . I have to admit that I don’t know where your /computer comes from. /usr and /opt should be off of the root directory.

@Ray name@name-myComputer:~$ this is what shows up when I first open the terminal. Is this my root path?

Uh, no. Your root directory is / . I think that link I sent to you mentions that. The prompt is the default prompt (yes, you can change it). It just says that your login name is name and the name of your computer is name-myComputer . The ~ is your «home directory» — the highest directory for a user. You can type pwd to find out what is the current directory. I guess I’m getting a bit off-topic. If anything I’ve said sounds confusing, perhaps you should look for tutorials on navigating through directories?

@Ray when I open the terminal and type pwd it says » / «. So does that mean I am in root by default? I’m sorry, this stuff is sort of confusing to me.

This post explains about the installation folders in ubuntu (or linux in general)- Where are programs installed

1 Answer 1

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

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

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

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

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

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

Источник

Where does a program install on linux?

I want to know the procedure of installation and uninstallation on Linux? Are there any log file that logs these procedure? For example, I am installing Netbeans IDE on Linux. I want to know where are the files of this IDE? I want to know where the folder is that contain programs that installed on Linux. For example, if you install Netbeans IDE, then you can see somethink like below on a file :

Читайте также:  Linux server what backup

3 Answers 3

Depends on the Linux flavor (distro) that you are running but typically programs get installed on /usr/bin or /usr/local/bin

You can cd to the /usr/bin directory and then do ls -la | more and you’ll see all the «executable» files there.

While is true that every distro has it’s own methods there is a standard (or attempt for it) filesystem hierarchy which is worth reading:

There you’ll see where should go the system binaries, the system libraries, why no_system binaries go some times to /usr/bin and some other times to /usr/local/bin, what is /bin, what the heck is /usr/sbin, where should be located the documentation of each package, why settings are placed in /etc, what is the /var directory, why packages which are not from your distro commonly are installed in /opt, etc.

Very helpful link, thanks! Would have been nice if you had summarized the relevant sections in your answer, as that is the answer to the question.

There are different methods depending on the linux distribution — On Redhat/Fedora the the installation is done though RPM packages, which then are distributed for update and installed mostly using YUM — How to create a RPM is documented here

On debrian/ubutu systems the equivalent is a DEB package which is distributed and installed though apt-get. How to create a DEB package is documented here

If all you want is your own program which you have compiled on your own system yo be accessible for you to execute, then either just setup the PATH to include the directory where your executable is located, or copy the executable to /usr/bin or (/usr/local/bin if that is part of the PATH already)

Источник

How to find the installation path for a software under linux?

Under linux, I launch a software by typing, e.g., fluidplot. How can I find the installation path for this software?

9 Answers 9

to see where it is executing from (if it’s in your $PATH). Or:

find / -name fluidpoint 2> /dev/null 

to look for a file named fluipoint and redirect errors on virtual filesystems.

Usually they are in /sbin , /usr/sbin , /usr/local/bin or ~ as a hidden directory.

NAME which - shows the full path of (shell) commands. SYNOPSIS which [options] [--] programname [. ] 

@Michael excellent to know. Because of your comment, I just discovered that newer versions of bash also do this. +1 to your comment.

The «Usually they are . » line is pretty disingenuous, additional software should be in /opt/* or /usr/local/bin . ~ is your home directory, I’m confused why you call it «hidden».

Sorry to be ambiguous, I mean ~/.dir . The hidden directory is below the home directory. And I completely forgot about /usr/local/bin dop.

If you use an RPM based distribution (CentOS, RHEL, SUSE, openSUSE) you can use rpm -ql

rpm -ql findutils /bin/find /usr/bin/find /usr/bin/xargs /usr/share/doc/packages/findutils /usr/share/doc/packages/findutils/AUTHORS /usr/share/doc/packages/findutils/COPYING /usr/share/doc/packages/findutils/NEWS /usr/share/doc/packages/findutils/README /usr/share/doc/packages/findutils/THANKS /usr/share/doc/packages/findutils/TODO /usr/share/info/find.info.gz /usr/share/man/man1/find.1.gz 

Things aren’t installed to locations in the Linux/UNIX world like they are in the Windows (and even somewhat in the Mac) world. They are more distributed. Binaries are in /bin or /sbin , libraries are in /lib , icons/graphics/docs are in /share, configuration is in /etc and program data is in /var .

Читайте также:  Kali linux boot live

The /bin , /lib , /sbin contain the core applications needed for booting and the /usr contains all the other user and system applications.

Just to add some point to @djsumdog’s answer, if you are using DPKG based dist, like Ubuntu, you can use

to check what it is about, and

dpkg --listfiles some_package 

to check what files are included/relevant to this package. It’s for packages that don’t have a binary to run, like libnss3 . And

to find what package includes this file.

For example, dpkg —listfiles libnss3 gives me:

/. /usr /usr/lib /usr/lib/i386-linux-gnu /usr/lib/i386-linux-gnu/libssl3.so /usr/lib/i386-linux-gnu/nss /usr/lib/i386-linux-gnu/nss/libsoftokn3.chk /usr/lib/i386-linux-gnu/nss/libnssckbi.so /usr/lib/i386-linux-gnu/nss/libnsssysinit.so /usr/lib/i386-linux-gnu/nss/libfreebl3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.so /usr/lib/i386-linux-gnu/nss/libsoftokn3.so /usr/lib/i386-linux-gnu/nss/libfreebl3.so /usr/lib/i386-linux-gnu/libnssutil3.so /usr/lib/i386-linux-gnu/libsmime3.so /usr/lib/i386-linux-gnu/libnss3.so /usr/share /usr/share/doc /usr/share/doc/libnss3 /usr/share/doc/libnss3/copyright /usr/share/doc/libnss3/changelog.Debian.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/libnss3 

Note that the folders are not only owned by this packages, but by others too. Just check the files.

And reversely, dpkg —search libnss3.so gives me:

firefox: /usr/lib/firefox/libnss3.so thunderbird: /usr/lib/thunderbird/libnss3.so libnss3:i386: /usr/lib/i386-linux-gnu/libnss3.so libnss3-1d:i386: /usr/lib/i386-linux-gnu/libnss3.so.1d 

Источник

How can i find the location of installed software in linux?

Is there any command that I can use in the console to know the location of installed software in linux? i have copied a xyz.bin from windows machine to linuxdesktop and installed it. more over can you please tell me how to uninstall a software which is installed in linux Thanks in advance

You might be able to use the find command to search for it. Have a look at this unix.stackexchange.com/questions/19369/…

3 Answers 3

to find the path where the binary is linked to.

Other application specific files may reside in

The way a package is installed/uninstalled on Linux depends on either the specific Linux distribution AND the specific package.

Since you have used a .bin file for installation, it is likely that you have an uninstall command specific for your program in the path.

If you provide more information about the package and the Linux distribution, we can give more help.

It depends on the distribution you’re using. Supposing you are using a debian\ubuntu distribution, you can uninstall it by the apt command, using sudo apt-get remove software_name sudo apt-get purge software_name

Of course you need to have root privileges.

The softwares are usually installed in bin folders, in /usr/bin, /home/user/bin and many other places, a nice starting point could be the find command to find the executable name, but it’s usually not a single folder. The software could have components and dependencies in lib,bin and other folders.

Источник

Оцените статью
Adblock
detector