Find Installation Path in Linux

How can i find the location of installed software in 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.

How to find the install path of git in Mac or Linux?

Execute in terminal

$ which git

that produces output

/usr/bin/git

on Linux. If you are looking for where is install directory on MAC and you installed git with brew then

brew info git

on Debian

dpkg -L git

Where can I find the Java SDK in Linux after installing it?

This depends a bit from your package system ... if the java command works, you can type readlink -f $(which java) to find the location of the java command. On the OpenSUSE system I'm on now it returns /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin/java (but this is not a system which uses apt-get).


On Ubuntu, it looks like it is in /usr/lib/jvm/java-6-openjdk/ for OpenJDK, and in some other subdirectory of /usr/lib/jvm/ for Suns JDK (and other implementations as well, I think).

Debian is the same.


For any given package you can determine what files it installs and where it installs them by querying dpkg. For example for the package 'openjdk-6-jdk': dpkg -L openjdk-6-jdk

How to get default installation directory for IBM MQ in linux and unix?

MQ v7.1 and higher support multiple installations on the same server. The command setmqenv when sourced will setup some environment variables to allow you to use a specific installation. One of the variables that is set by setmqenv is $MQ_INSTALLATION_PATH. You can display the value of this variable with the command echo $MQ_INSTALLATION_PATH.

$ echo $MQ_INSTALLATION_PATH
/opt/mqm

If the installation has been setup as default using the setmqinst command, then various symlinks will be created under /usr/bin pointed back to the mq installation directory. You can display the installation directory by running the /usr/bin/dspmqver command and looking for InstPath in the output.

You can also directly call the command dspmqver -f 128 to have it return just the installation path:

InstPath:    /opt/mqm

If the install is not setup as the default install and you do not know which directory MQ is installed in you can look at the /etc/opt/mqm/mqinst.ini file which will have a stanza for each installation on the server. The installation path is listed after FilePath= under each Installation stanza.

$ cat /etc/opt/mqm/mqinst.ini
Installation:
Name=Installation1
Description=
Identifier=1
FilePath=/opt/mqm

Conda get path of package installation

I was specifying yaml, whereas I should have been installing pyyaml:

conda install pyyaml

How do I find the location of my Python site-packages directory?

There are two types of site-packages directories, global and per user.

  1. Global site-packages ("dist-packages") directories are listed in sys.path when you run:

     python -m site

    For a more concise list run getsitepackages from the site module in Python code:

     python -c 'import site; print(site.getsitepackages())'

    Caution: In virtual environments getsitepackages is not available with older versions of virtualenv, sys.path from above will list the virtualenv's site-packages directory correctly, though. In Python 3, you may use the sysconfig module instead:

     python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'
  2. The per user site-packages directory (PEP 370) is where Python installs your local packages:

     python -m site --user-site

    If this points to a non-existing directory check the exit status of Python and see python -m site --help for explanations.

    Hint: Running pip list --user or pip freeze --user gives you a list of all installed per user site-packages.



Practical Tips

  • <package>.__path__ lets you identify the location(s) of a specific package: (details)

      $ python -c "import setuptools as _; print(_.__path__)"
    ['/usr/lib/python2.7/dist-packages/setuptools']
  • <module>.__file__ lets you identify the location of a specific module: (difference)

      $ python3 -c "import os as _; print(_.__file__)"
    /usr/lib/python3.6/os.py
  • Run pip show <package> to show Debian-style package information:

      $ pip show pytest
    Name: pytest
    Version: 3.8.2
    Summary: pytest: simple powerful testing with Python
    Home-page: https://docs.pytest.org/en/latest/
    Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
    Author-email: None
    License: MIT license
    Location: /home/peter/.local/lib/python3.4/site-packages
    Requires: more-itertools, atomicwrites, setuptools, attrs, pathlib2, six, py, pluggy

Find path of applicaiton installed Ubuntu

You can always try running "which pycharm-community" in your terminal, it will probably output a path of the binary it is trying to start.



Related Topics



Leave a reply



Submit