0

I know we can print every process on the Ubuntu system with this command:

ps -au

But How to print only process numbers for the SSH server?

1 Answers1

1

If you want to see just the process numbers, you can use:

pgrep sshd

If you would like to see columns of data with more information than process numbers, you can use:

pgrep -a sshd

or

ps -aux|grep '[s]shd'

See How does this [t]ricky bracket expression in grep work?

steeldriver
  • 142,475