-1

When I do ps aux, I see a lot of processes. If I just do the ps ux still lot of processes. How do I differentiate or can see which processes are not attached to the terminal ( as 'x' in 'aux' defines it) ?

Edit:- Addition to the question. How does the command gets mapped with a particular tty or pts in the case below ? enter image description here

0

All processes with a tty:

ps a

All processes without a tty:

ps a --deselect
  • Thanks , my original question is solved but I got a new one now. Can you tell me why all the numbers in the PID are not there, I can see some missing numbers in the order like 1,2,4 etc. 3 is missing. Why is that ? – Anshul Choudhary Jan 14 '18 at 21:54
  • @AnshulChoudhary Each new process gets a PID which is one higher than that of the last process (until the first PID overflow). But, of course, processes finish and exit. That creates the "PID holes". This strategy reduces the risk that a PID is reassigned after a short time which might lead to two processes getting mixed up. – Hauke Laging Jan 14 '18 at 22:13
0

Once you have launched ps aux, there is a column labeled TTY: this indicates which terminal the process is attached to. There will be none mentionned for the processes you are searching for. Try ps aux|less if there are a lot of processes. For information, the command tty (teletypewriter) indicates the terminal you are connected to.

  • Yes, it solves my prior question. Can you help me a little more, I have edited the question.@AnnQuark – Anshul Choudhary Jan 15 '18 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.