Find installation path in linux

Where can I find the location of folders for installed programs?

I’m new to Ubuntu and would like to know where I can find the location of program files for programs installed from the Ubuntu Software Center or the Terminal.

If you prefer/use RPM on Ubuntu, you can also use rpm –ql [package] to get a list. This method also happens to work on most Fedora and RHEL distros.

8 Answers 8

Also, if you just need to know where the executable is you can run whereis executable or which executable For instance:

$ whereis firefox firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/share/man/man1/firefox.1.gz $ which firefox /usr/bin/firefox 

on the command line, you can use dpkg —listfiles packagename . For instance, dpkg —listfiles firefox . If you want to see what files a package contains without installing it, then you can install apt-file and use that.

But you really shouldn’t mess with it. There is usually no reason to manually interfere with the contents of a package. All configuration files for normal applications are placed in the users home directory. You don’t have savegames in C:\Programfiles\Appname\savegames , for instance. They would be placed in /home/username/.local/share/appname/savegames . That way, if you move your home directory to another machine, it keeps all configurations and user data.

This command says «package ‘sdl’ is not installed»; But this command: «dpkg —get-selections | grep sdl» returned : libsdl-image1.2:amd64 install —- libsdl1.2debian:amd64 install —- libsdl2-2.0-0:amd64 install —- libsdl2-dev install

The OP wants to know where the installation directory containing the app files is located. He did not ask for a list of files in a package.

@HedleyFinger: There is no such thing as the «installation directory». Each app has files stored in many different directories for different types of files. /etc for default configs, /usr/bin for binaries, /usr/lib for libraries, etc. The command I showed, shows where all app files are installed.

If you do not find the command with whereis or which then maybe it is an alias. Try

and check if the command is in the list.

Use the synaptic-package-manager :

synaptic Package Manager (GUI)

Assuming that we’d like to locate the files of the autotools-dev package, under ‘Quick filter’ enter autotools to locate it. The autotools-dev package appears automatically. Select it by clicking on it and then press ‘Properties’. In the appearing dialog select the tab ‘Installed Files’.

Читайте также:  Зашифрованная файловая система linux

The builtin Bash command, called command is also available:

 command [-pVv] command [arguments …] 
$ command -V cat cat is /bin/cat 

When the searched command is an alias:

$ command -v ll alias ll='ls -alF' 
$ command -V ll ll is aliased to `ls -alF' 

Coming to Linux from Windows, there are some different terminology, which sometimes seems strange.

The first one is the word package that we find on Linux. We install packages on Linux, which may sound different but makes total sense:

  • When installing something on the computer, we are installing programs like in your question, but also configuration files, images, documentation, etc. Sometimes we are even installing, in one package, many programs

One example for you, i was looking for installing a package called bluez-tools in Lubuntu 22.04. In your terminal:

sudo apt install bluez-tools 

After installing it, the question is, how to use this bluez-tools stuff i have installed. Then we have the answer to your question, we have to look for what and where we have just installed the package in our system.

The following command gives you some information about the package you just installed.

dpkg -l bluez-tools ii bluez-tools 2.0~20170911.0.7cb788c-4 amd64 Set of tools to manage Bluetooth devices for linux 

And this other command shows what and where things were installed

dpkg -l bluez-tools /. /usr/bin /usr/bin/bt-adapter /usr/bin/bt-agent /usr/bin/bt-device /usr/bin/bt-network /usr/bin/bt-obex /usr/share /usr/share/doc /usr/share/doc/bluez-tools /usr/share/doc/bluez-tools/README /usr/share/doc/bluez-tools/changelog.Debian.gz /usr/share/doc/bluez-tools/copyright /usr/share/man /usr/share/man/man1 /usr/share/man/man1/bt-adapter.1.gz /usr/share/man/man1/bt-agent.1.gz /usr/share/man/man1/bt-device.1.gz /usr/share/man/man1/bt-network.1.gz /usr/share/man/man1/bt-obex.1.gz 

It can be seen the package contains 5 programs, some docs, and five manual pages.

Источник

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

Читайте также:  Nvidia and intel graphics linux

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.

Источник

Find installation path in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

services are automatically installed. How to find exact path where any service is installed and their configuration files??

3 Answers 3

There are quite a few ways to find this but I usually prefer following

and to find from which path program is using, I use

If you’re using apt-get , install apt-file program and you can list the contents of the package:

sudo apt-file update apt-file list package_name 

This will show all the files that will be installed by a package, binaries, configuration files, systemd startup files, etc.

If you use yum , install yum-utils and use repoquery :

Suppose service name is nginx then you can find it in /etc/nginx/ on ubuntu .

On centos you can check path using commands given by slashRahul. As per my knowledge you can not change installation path while installing by apt-get. Software components are not installed in a single directory, but across many folders like binaries stay in /usr/bin/, /bin, /sbin, Configuration in other directories.

Источник

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?

Читайте также:  Linux error code errno

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 .

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 

Источник

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