Score:0

How to print only process numbers for the SSH server in Ubuntu command

iq flag

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?

hr flag
[pgrep, pkill - look up or signal processes based on name and other attributes](https://manpages.ubuntu.com/manpages/focal/man1/pgrep.1.html)
JavascriptNewbie avatar
iq flag
Can you show me the detail command for my purpose
Score:1
pf flag

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?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.