LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install location of a running service. (https://www.linuxquestions.org/questions/linux-newbie-8/install-location-of-a-running-service-4175524086/)

vipinsqa 11-02-2014 06:12 AM

Install location of a running service.
 
Hello Guys,

I am using below command to get a list of services on my Linux box:-
service --status-all

Need to get the install location as well for each of the service OR the location where the corresponding package is deployed which is hosting this service.

Can anyone please confirm how can I get this information?

Many Thanks.

Regards.

smallpond 11-02-2014 06:28 AM

Linux is not a single monolithic operating system controlled by one corporation similar to other OS that you may have used. Since different distros use different package managers answering your question requires knowing which distribution and version you have installed.

vipinsqa 11-02-2014 07:22 AM

Here is the output from uname:-

2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

does this help smallpond?

smallpond 11-02-2014 08:41 AM

Nope. That's just the kernel version. Try:

Code:

cat /etc/*release

vipinsqa 11-02-2014 09:42 AM

Thanks, below is the output:-

CentOS release 6.3 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.3 (Final)
CentOS release 6.3 (Final)

smallpond 11-03-2014 05:49 AM

To list all installed packages do

Code:

rpm -qa
To list the location of the files in a package do

Code:

rpm -ql packagename

vipinsqa 11-07-2014 02:34 AM

Hi Guys,

Apologies for posting duplicate thread on similar problem.
My problem here is just this:- I need to get a list of running services on Centos OS and the corresponding install location of their packages. I used this command to get list of running services:- service --status-all

Now, for the list of services retrieved, I need to get the location of packages related to the service OR the application hosting this service. Please let me know if there is any way to retrieve the same. Would be grateful.

Thanks in advance.


All times are GMT -5. The time now is 05:15 AM.