Is my program installed?

From CsWiki
Jump to: navigation, search

Introduction

On this page we will explain how to test and see if a program you seek to use is already installed on in in the Debian Linux software distribution used in the HUJI School of Computer Science and Engineering.

Methods

The very first step to check if a program is installed and of which you know the command is trying

which command

or

whereis command

this should tell you if the command exists in your PATH, you can then run said command, if it is installed and in the PATH of your session the program will either start or display some form of help/error message. If it is not installed or not in the PATH your shell will return command not found.

Example output:

~$ which firefox                                                                                                                                      
/usr/bin/firefox
~$ whereis firefox                                                                                                                                    
firefox: /usr/bin/firefox /usr/lib/firefox
~$ which firefoz
~$ firefoz
bash: firefoz: command not found


Modules

As of the 5778 school year we have started using software modules to make various programs that need special settings available the following command

module avail

to see a list of different modules that are available, it should be noted that loading certain modules may trigger other modules becoming available, for instance the bioinfo will make a set of Bio Informatics modules available.

Please refer to the software modules documentation for exact usage instructions.

Moduleavail.png

apt/dpkg

Our systems are Debian based and use the apt package manager, there are lots of ways to interact with the apt system we'll just cover one method here.

apt-cache search ProgramName

Will return a list of available packages that match the search criteria after which running

dpkg -l PackageName

will show the status of a specific package.

If you find a package is installed but you don't know what command to use to use the program you can use

dpkg -L PackageName 

to see the contents of the package, generally the binaries/scripts related to the package tend to be in some subtree of a bin directory.

Aptdpkg.png

If you just want to know if an official debian package exists of a program you can also search online at Debian package search, other package search functions for Ubuntu and for Linux Mint