LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2014, 07:12 AM   #1
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Rep: Reputation: Disabled
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.
 
Old 11-02-2014, 07:28 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,855

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
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.
 
Old 11-02-2014, 08:22 AM   #3
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
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?
 
Old 11-02-2014, 09:41 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,855

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Nope. That's just the kernel version. Try:

Code:
cat /etc/*release
 
Old 11-02-2014, 10:42 AM   #5
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
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-noarchrinting-4.0-amd64rinting-4.0-noarch
CentOS release 6.3 (Final)
CentOS release 6.3 (Final)
 
Old 11-03-2014, 06:49 AM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,855

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
To list all installed packages do

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

Code:
rpm -ql packagename
 
Old 11-07-2014, 03:34 AM   #7
vipinsqa
Member
 
Registered: Oct 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
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.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Google I/O Android News: Location, Location, Location (Plus Cloud Messaging and Bluetooth) LXer Syndicated Linux News 0 06-05-2013 02:00 PM
service location for GPSR farfattou Linux - General 0 02-06-2013 05:44 PM
A script is running from an unknown location.how we can find its exact location. saurav23june Linux - Newbie 5 05-15-2012 05:27 AM
Location of a program running in terminal, launched from panel. uetian Linux - Newbie 1 12-17-2010 10:24 PM
find the exact location of a running exec file cahdecah General 4 08-16-2007 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration