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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-07-2005, 08:47 AM
|
#1
|
LQ Newbie
Registered: Oct 2005
Posts: 2
Rep:
|
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
|
|
|
10-07-2005, 08:56 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
10-07-2005, 08:59 AM
|
#3
|
LQ Newbie
Registered: Oct 2005
Posts: 2
Original Poster
Rep:
|
thank you!
|
|
|
10-07-2005, 01:59 PM
|
#4
|
Member
Registered: Aug 2005
Distribution: Gentoo
Posts: 38
Rep:
|
You can also go into /usr/bin and type ls
|
|
|
10-07-2005, 02:06 PM
|
#5
|
Senior Member
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020
Rep:
|
Hello,
List the packages
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
|
|
|
10-07-2005, 02:11 PM
|
#6
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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).
|
|
|
10-07-2005, 02:22 PM
|
#7
|
Member
Registered: Aug 2005
Distribution: Gentoo
Posts: 38
Rep:
|
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.
|
|
|
10-07-2005, 02:56 PM
|
#8
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
10-07-2005, 03:35 PM
|
#9
|
Member
Registered: Aug 2005
Distribution: Gentoo
Posts: 38
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|