LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-04-2006, 09:32 AM   #1
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Rep: Reputation: 15
looking for the command


hi. looking for the command that tells you what version of what program/app. you are running. I forget. Uname is for the kernel and hardware only, it seems.

in this particular case, I'd like to know what version of apache is on my linux box. A box someone else used before me. Not that it should matter, b/c we are talking linux commands, (right?) but Fedora Enterprise is the dist.
 
Old 01-04-2006, 10:08 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Quite often, you can use the program name and --version or --help.
For example:

firefox --version
Mozilla Firefox 1.0.7, Copyright (c) 1998 - 2005 mozilla.org

firefox --help
Usage: /usr/lib/firefox-1.0.7/firefox-bin [ options ... ] [URL]
where options include:
 
Old 01-04-2006, 10:10 AM   #3
british_76
Member
 
Registered: Dec 2003
Distribution: kubuntu breezy badger
Posts: 30

Rep: Reputation: 15
apache -v
apachectl status
...
 
Old 01-04-2006, 10:11 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Sometimes, you can use "-v". The best way to check would be to see the command's man page.
 
Old 01-04-2006, 10:12 AM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,495

Rep: Reputation: 193Reputation: 193
You can usually get that info with:

$ <command> --version
 
Old 01-04-2006, 10:34 AM   #6
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Original Poster
Rep: Reputation: 15
tthat's funny. i did both "apache -v" and "./apache -v" each case, bash command not found.
Code:
[bowie@d.com bowie]$ which apache
/usr/bin/which: no apache in (/usr/kerberos/bin:/usr/local/bin:/home/oracle/OraHome1/bin:/usr/java/jdk1.5.0_01/bin:/usr/ant-1.6.2/bin:/usr/local/pgsql/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bowie/bin)
 
Old 01-04-2006, 10:46 AM   #7
british_76
Member
 
Registered: Dec 2003
Distribution: kubuntu breezy badger
Posts: 30

Rep: Reputation: 15
Quote:
Originally Posted by bowie101
tthat's funny. i did both "apache -v" and "./apache -v" each case, bash command not found.
Code:
[bowie@d.com bowie]$ which apache
/usr/bin/which: no apache in (/usr/kerberos/bin:/usr/local/bin:/home/oracle/OraHome1/bin:/usr/java/jdk1.5.0_01/bin:/usr/ant-1.6.2/bin:/usr/local/pgsql/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/bowie/bin)

this may be depending on your distribution. i have now experience wie fedora. maybe your should look for httpd or something ...
 
Old 01-04-2006, 10:50 AM   #8
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Original Poster
Rep: Reputation: 15
no httpd command as well.

so iguess the newbie question now becomes, what command do you use to quickly find out which commands control which services?

thanks for the help. It does an exWindows player's heart some good!

Last edited by bowie101; 01-04-2006 at 10:51 AM.
 
Old 01-04-2006, 10:58 AM   #9
british_76
Member
 
Registered: Dec 2003
Distribution: kubuntu breezy badger
Posts: 30

Rep: Reputation: 15
you are sure, that apache is installed?

if it is installed via rpm you should find it via
"rpm -qa | grep http"

elsewise try "locate http"
 
Old 01-04-2006, 11:05 AM   #10
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Original Poster
Rep: Reputation: 15
Code:
$  rpm -qa | grep http


httpd-2.0.46-46.ent
httpd-devel-2.0.46-46.ent
libghttp-1.0.9-8.1
 
Old 01-04-2006, 11:12 AM   #11
british_76
Member
 
Registered: Dec 2003
Distribution: kubuntu breezy badger
Posts: 30

Rep: Reputation: 15
yes! then your apache is version 2.0.46!

now give "rpm -ql httpd" a try ... it lists all the files contained in the httpd-package.
 
Old 01-04-2006, 11:21 AM   #12
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Original Poster
Rep: Reputation: 15
wow! way too many to list here! so it's just all the files in the directory, then?
 
Old 01-04-2006, 11:27 AM   #13
british_76
Member
 
Registered: Dec 2003
Distribution: kubuntu breezy badger
Posts: 30

Rep: Reputation: 15
"rpm -ql httpd | grep bin" ... should show you all binaries.

on redhat es3 /usr/sbin/httpd is the binary that spawns the apache-daemon.
 
Old 01-04-2006, 12:59 PM   #14
bowie101
Member
 
Registered: Nov 2005
Distribution: FC4 & RHES
Posts: 105

Original Poster
Rep: Reputation: 15
alright, thanks!
 
  


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
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Why after start of a command the invitation for input next command has not appeared. ukrainet Linux - General 3 06-24-2005 09:16 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM


All times are GMT -5. The time now is 05:51 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