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 |
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.
|
 |
08-24-2004, 01:19 PM
|
#1
|
LQ Newbie
Registered: Jun 2004
Posts: 8
Rep:
|
Basic question
Hi
I am new to Unix and Linux.
I just have a very basic question:
When I run 'PS' command, I only got two lines like below:
=====================
PID TT S TIME COMMAND
1327 pts/0 S 0:00 -csh
=====================
But if I run 'PS -a' command, I got more lines like below:
=============================
PID TT S TIME COMMAND
327 console S 0:00 /usr/lib/saf/ttymon -g -h -p milford3 console login: -
1327 pts/0 S 0:00 -csh
1347 pts/0 O 0:00 ps -a
=============================
My question is "Isn't 'PS' command mean the current running process?"
If so, how come when given argument, it will show more current running process?
Thanks a lot!
|
|
|
08-24-2004, 01:27 PM
|
#2
|
Member
Registered: Aug 2003
Location: Florida
Distribution: Mandrake 9.1 for now
Posts: 205
Rep:
|
Re: Basic question
Quote:
Originally posted by a2715mt
Hi
I am new to Unix and Linux.
I just have a very basic question:
When I run 'PS' command, I only got two lines like below:
=====================
PID TT S TIME COMMAND
1327 pts/0 S 0:00 -csh
=====================
But if I run 'PS -a' command, I got more lines like below:
=============================
PID TT S TIME COMMAND
327 console S 0:00 /usr/lib/saf/ttymon -g -h -p milford3 console login: -
1327 pts/0 S 0:00 -csh
1347 pts/0 O 0:00 ps -a
=============================
My question is "Isn't 'PS' command mean the current running process?"
If so, how come when given argument, it will show more current running process?
Thanks a lot!
|
-a show processes of other users too
When you specify the 'a' command line option you are showing processes started by users/accounts other than just your account.
add u to heave it tell you which user started the process, and x to show processes without controlling terminals, togather this is show all processes.
To learn a little more about ps try here
http://man.he.net/?topic=ps§ion=all
Last edited by WhiteChedda; 08-24-2004 at 01:28 PM.
|
|
|
08-24-2004, 01:34 PM
|
#3
|
LQ Newbie
Registered: Jun 2004
Posts: 8
Original Poster
Rep:
|
PS command
So 'PS' and 'PS -ax' all mean the current running process?
|
|
|
08-24-2004, 01:37 PM
|
#4
|
LQ Newbie
Registered: Jun 2004
Posts: 10
Rep:
|
PS gives a snapshot of the running processes, by adding the switches you refine the actions of the command. In the case of -a you select all with a TTY except session leaders. I think this means that you show the processes that are talking to your screen(?)
If you try ps -A you will get a list of all the processes, remember that Linux and UNIX are case sensitive.
This is in Red Hat, I guess the rest of the distros are much the same?
|
|
|
08-24-2004, 01:48 PM
|
#5
|
LQ Newbie
Registered: Jun 2004
Posts: 8
Original Poster
Rep:
|
Thank you for your reply.
What does this mean?
-a List information about all processes most fre-
quently requested: all those except process group
leaders and processes not associated with a termi-
nal.
"most frequently requested"?
|
|
|
08-25-2004, 06:39 AM
|
#6
|
LQ Newbie
Registered: Jun 2004
Posts: 10
Rep:
|
most frequently requested
I guess that that means as it says. Your screen will refresh very quickly and that will be a process.
Like you I am a real new comer to Linux so I am trying to and learn at the same time......
|
|
|
08-25-2004, 07:08 AM
|
#7
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,443
|
ps is a distro/Unix ver dependent cmd. for instance, on my RH9 system we get (from the man page):
Code:
-a select all with a tty except session leaders
a select all processes on a terminal, includ-
ing those of other users
which is explained by this:
Code:
COMMAND-LINE OPTIONS
This version of ps accepts several kinds of options.
Unix98 options may be grouped and must be preceeded by a dash.
BSD options may be grouped and must not be used with a dash.
GNU long options are preceeded by two dashes.
Options of different types may be freely mixed.

|
|
|
08-25-2004, 07:27 AM
|
#8
|
LQ Newbie
Registered: Aug 2004
Location: India
Distribution: all linux
Posts: 21
Rep: 
|
I think doing
#man as
and
#info as
* where # is your console prompt
should give you indepth information on what this command does and all the options you could use with it, in fact you can do #man [command] for any linux command.
Cheers
|
|
|
08-25-2004, 08:29 AM
|
#9
|
LQ Newbie
Registered: Jun 2004
Posts: 8
Original Poster
Rep:
|
PS -au showed me as root
How come when I typed 'PS -au' it showed me as root? I didn't log in as root.
root 15234 0.2 0.5 1448 1176 pts/1 O 09:27:24 0:00 ps -ua
|
|
|
08-25-2004, 08:39 AM
|
#10
|
LQ Newbie
Registered: Jun 2004
Posts: 8
Original Poster
Rep:
|
Continues Question
What does this mean?
"... x to show processes without controlling terminals..."
What are controlling terminals?
|
|
|
All times are GMT -5. The time now is 06:29 PM.
|
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
|
|