LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-07-2005, 08:47 AM   #1
philthee
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
List installed Programs


Hi there, sorry for what seems a very easy question but how do i list the installed programs on linux?
command line job!

Cheers

Phil
 
Old 10-07-2005, 08:56 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,765
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
It depends on your distro. For RedHat, Fefora and others its:

rpm -qa

Note that will only list packages installed by rpms. If you have a commercial package or did your own compile they might not be in the list.
 
Old 10-07-2005, 08:59 AM   #3
philthee
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Original Poster
Rep: Reputation: 0
thank you!
 
Old 10-07-2005, 01:59 PM   #4
pippo
Member
 
Registered: Aug 2005
Distribution: Gentoo
Posts: 38

Rep: Reputation: 15
You can also go into /usr/bin and type ls
 
Old 10-07-2005, 02:06 PM   #5
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
Hello,

List the packages
Code:
rpm -qa | less
What packages does package "P" regquires ??
Code:
rpm -q --requires P
What package do require package P??

Code:
rpm -q --which - requires P
To see if a particular package is installed
Code:
rpm -qa | grep < pkg. name > ( without <>)
if you don't know the exact pkg. name
Code:
rpm -qa | grep -i <pkg. name>
regards
 
Old 10-07-2005, 02:11 PM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,765
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
Originally posted by pippo
You can also go into /usr/bin and type ls
This would show you SOME executables but two issues with this:

1) It doesn't show ALL executables by a long shot. (what about sbin, opt, local etc...?)

2) Most packages have multiple executables included which may or may not have anything to do with the name of the package. (see binutils package for example).
 
Old 10-07-2005, 02:22 PM   #7
pippo
Member
 
Registered: Aug 2005
Distribution: Gentoo
Posts: 38

Rep: Reputation: 15
I was aware of that.

But it seems to me to be the most immediate way to to see most of the executable programs you have.

Of course, some packages have executables that don't have much to do with the name of the package itself (e. g. net-utils). But, any way, it still gives you the names of the executable files.

Of course, these files can be in other places but most of them will be in /usr/bin.
 
Old 10-07-2005, 02:56 PM   #8
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,765
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Most...

Just as a quick check on one of my RedHat servers: 347 files in /usr/bin and 123 in /usr/sbin. That means 25% (ignoring all other directories) are in /usr/sbin. So while you'e correct that 75% is technically "most" the other 25% could be considered "significant".

Look at it this way: I could probably or play tennis with only 75% of my limbs but wouldn't be willing to get rid of 25% of them to do it. And of course it would depend a lot on what the 25% missing was - one hell of a lot easier if its an arm rather than a leg.

Wasn't trying to put you down in prior post - just noting issues with the method you mentioned. The point in forums is to learn. On more than one occasion someone has pointed out things I didn't know and I saw no need to take umbrage at it.
 
Old 10-07-2005, 03:35 PM   #9
pippo
Member
 
Registered: Aug 2005
Distribution: Gentoo
Posts: 38

Rep: Reputation: 15
When I saw someone was asking to see what programs were installed, I instantly thought the most direct (although incomplete) way would be to take a look into /usr/bin and /usr/sbin. Then I had second thoughts about sbin since it contains things that are more exotic (I explain below what I mean).

Since the person introduced himself as a newbie, I assumed that he just wanted to see what programs (like firefox, kmail...) were installed. And the simplest way to help was to suggest him to take a peek in /usr/bin. Of course, there are a lot of things in sbin but I felt that the user was looking for things like firefox rather than sshd or traceroute.

I know where programs are. In /usr/bin but also sbin and elsewhere. My goal was not to be technically flawless but rather to provide with a simple and immediate answer. It seemed to me more simple than exploring the packages and it probably met the needs of the person who posted the message.

I still think that looking in /usr/bin is the simplest way to answer questions like 'do I have mozilla?' which what I understood was the purpose athough it will miss a lot of things.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
saving list of installed programs DAChristen29 Ubuntu 1 08-28-2005 04:58 PM
apt-get list of programs hraposo Debian 5 10-20-2004 07:51 AM
list of graphics programs? ScislaC Linux - Software 3 08-09-2004 08:38 AM
How to get newly installed programs in programs list Brosky Linux - Software 5 02-06-2004 03:45 PM
list of programs I have ole Linux - Newbie 5 03-17-2003 08:20 PM


All times are GMT -5. The time now is 08:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration