Linux where program installed

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

Источник

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.

Читайте также:  Linux перемонтировать root в режиме rw

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.

Источник

How do I find where an application is installed?

I installed wireshark recently. I have no idea in which directory it was installed, but it’s not in /opt . How do I find where it’s installed?

5 Answers 5

Assuming you installed it from the repos:

$ dpkg -L wireshark wireshark-common /. /usr /usr/bin /usr/bin/wireshark /usr/share /usr/share/menu /usr/share/menu/wireshark /usr/share/pixmaps /usr/share/pixmaps/wsicon32.xpm /usr/share/applications /usr/share/applications/wireshark.desktop /usr/share/doc /usr/share/doc/wireshark /usr/share/doc/wireshark/copyright /usr/share/icons /usr/share/icons/hicolor /usr/share/icons/hicolor/48x48 /usr/share/icons/hicolor/48x48/apps /usr/share/icons/hicolor/48x48/apps/wireshark.png /usr/share/icons/hicolor/scalable /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/scalable/apps/wireshark.svg /usr/share/man /usr/share/man/man1 /usr/share/man/man1/wireshark.1.gz /usr/share/doc/wireshark/changelog.Debian.gz /usr/share/doc/wireshark/README.Debian /. /usr /usr/bin /usr/bin/editcap /usr/bin/text2pcap /usr/bin/dumpcap /usr/bin/rawshark /usr/bin/mergecap /usr/bin/capinfos /usr/share /usr/share/doc /usr/share/doc/wireshark-common /usr/share/doc/wireshark-common/README.Debian /usr/share/doc/wireshark-common/copyright /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/wireshark-common /usr/share/man /usr/share/man/man4 /usr/share/man/man4/wireshark-filter.4.gz /usr/share/man/man1 /usr/share/man/man1/mergecap.1.gz /usr/share/man/man1/capinfos.1.gz /usr/share/man/man1/dumpcap.1.gz /usr/share/man/man1/editcap.1.gz /usr/share/man/man1/text2pcap.1.gz /usr/share/man/man1/rawshark.1.gz /usr/share/doc/wireshark-common/changelog.Debian.gz 

which wireshark will lead you to the executable. The output could ressemble this :

$ which wireshark /usr/bin/wireshark 

Software never gets installed into /opt unless you yourself do that.

it only works in this particular case. what if I was to install «my super program», how would I find its path?

@AlanDert why would it not work? 🙂 which checks the current environment so it will find it if you can execute it.

Some packages do install in /opt , though none in the main repositories do this. Examples: Google Chrome, Adobe Reader (Canonical partner repository), Spotify, etc. Please also note that it is even an requirement to install in /opt for MyApps (extras.ubuntu.com). developer.ubuntu.com/publish/my-apps-packages

This answer is mostly wrong. which program-name returns the path to the executable, which can be completely different from the install location of a program(e.g. there is /usr/bin/inkscape but the installation is in /usr/share/inkscape ). They are identical iff the program is a single executable without any need for system-wide resources/extensions/configurations.

I would recommend going with @Oli’s answer, if that works for you. For applications that you (for whatever reason) didn’t install with the

You can examine the unity launcher icon, it may be able to tell you:

Читайте также:  Services and processes in linux

The launcher file will usually be located in /usr/share/applications/ , and named something like my-application-launcher.desktop . If you don’t know exactly what the file is called, use ls to examine the directory. (For your specific one, it is called wireshark.desktop .)

Once you know which one it is, examine its contents (anything from cat to gedit will work, but if you use gedit make sure to do it as gksu gksu gedit , not sudo gedit ).

The file will contain an entry with something like Exec=command or Exec=/path/to/script.sh . If it only has a command, you can use which or locate (like @Rinzwind said) to get the full path for it. Another option is to use whereis to find the binary or source location.

The directory containing the launcher’s target should be the installation directory for the program. If the launcher points to a shell script, sometimes examining its contents can reveal additional locations, if needed.

Running gksu nautilus when you get there will give you a windowed file browser with root permissions, meaning you can use it to copy/delete/edit any file, since normally installations are protected and will prevent you from modifying files as a normal user.

If that doesn’t work, another option is to use find , to find anything with the same name, or grep , to find files containing the name.

However, you should only do this if you don’t have any better alternatives. This can be a slow, tedious, mind-numbing process, especially since sometimes there is more than one location that stuff is installed to. If you can, use some other method.

Источник

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.

Читайте также:  Linux узнать какие службы запущены

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’.

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.

Источник

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