Where is my software installed in Linux?

Try

locate MATLAB

The binary file is spelled with all-caps. In my system, the MATLAB executable is installed in /usr/local/matlab/r2009b/bin/glnxa64/MATLAB (which is a slightly weird place). The matlab root would then be /usr/local/matlab/r2009b

Of course, normally you do run matlab using the long shell script...


I did

cat `which matlab` | grep matlab

with output

exec /usr/local/bin/matlab64 -r maxNumCompThreads=4 $*
    echo "   qsub -I -V -l nodes=1,matlab=1"
            exec /usr/local/bin/matlab64 $*
            exec /usr/local/bin/matlab32 $*

Then

$ ls -ld /usr/local/bin/matlab64
lrwxrwxrwx 1 root root 30 May  4 12:08 /usr/local/bin/matlab64 -> /usr/local/matlab64/bin/matlab
$ ls -ld /usr/local/bin/matlab32
lrwxrwxrwx 1 root root 28 May  4 12:08 /usr/local/bin/matlab32 -> /usr/local/matlab/bin/matlab
$ ls -ld /usr/local/matlab64 
lrwxrwxrwx 1 root root 27 May  4 12:01 /usr/local/matlab64 -> /usr/local/matlab_2010a-64/
$ ls -ld /usr/local/matlab 
lrwxrwxrwx 1 root root 23 May  4 12:01 /usr/local/matlab -> /usr/local/matlab_2010a

EDIT: The better way is to do it from matlab command line with matlabroot.

>> matlabroot

ans =

/usr/local/matlab_2010a-64

On RPM based distributions you can use

rpm -ql <package_name>

It will show you all files from the package

# rpm -ql wget
/etc/wgetrc
/usr/bin/wget
/usr/share/doc/wget-1.10.2
/usr/share/doc/wget-1.10.2/AUTHORS
....

If you're not sure how the package is called, you may use something like rpm -qa | grep -i matlab to find its name