I have a machine in my organization that I sshed and received a terminal.

When I run netstat -ntlp I received:

[root@webtl1 ~]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      527/systemd-resolve
tcp6       0      0 :::5355                 :::*                    LISTEN      527/systemd-resolve
tcp6       0      0 :::22                   :::*                    LISTEN      1/systemd  

When I run ps -a I received:

[root@webtl1 ~]# ps -a
  PID  TTY          TIME CMD
  1165 pts/0    00:00:00 ps  

I don't see the process systemd-resolve. But if I run ps -p 527 I do see it:

[root@webtl1 ~]# ps -p 527
  PID TTY          TIME CMD
  527 ?        00:00:00 systemd-resolve  

Why I don't see it with ps -a ?


A simple ps shows only your own processes, not system processes or other users' processes. ps allows options to show more processes, e.g. ps ax or ps -e or ps -A.

ps -a doesn't show the process systemd-resolve because it's not associated with a terminal. See man ps for details.

  • Why not mentioning ps -ax? – Rui F Ribeiro Jan 15 at 13:50
  • @Rui ps -ax is ps ax (-x doesn’t exist so it’s interpreted as a BSD option), which is mentioned. – Stephen Kitt Jan 15 at 15:02

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.