recentpopularlog in

kme : pseudoterminal   1

linux - how to kill the tty in unix - Stack Overflow | https://stackoverflow.com/
This was essentially what I needed
<code class="language-bash">ps -ft pts/6 -t pts/9 -t pts/10</code>

And my actual command line looked like this:
<code class="language-bash">
# probably could've done this with just 'who -al' instead of who + ps
who | grep userid \
| awk '{print $2}' \
| parallel 'ps -ft {} \
| tail -n +2' \
| awk '{print $2}'
| xargs kill -HUP</code>

And with some refinement, I was able to do something like this:
<code class="language-bash">
who -al | grep old \
| awk '{print $7}' \
| sudo xargs kill -HUP</code>

Also:
I had the same question as you but I wanted to kill the gnome terminal which I was in. I read the manual on "who" and found that you can list all of the sessions logged into your computer with the '-a' option and then the '-l' option prints the system login processes.
<code class="language-bash">who -la</code>

Also:
<code class="language-bash">pkill -9 -t pts/0</code>
unix  linux  sysadmin  pseudoterminal  processmanagement  solution 
march 2019 by kme

Copy this bookmark:





to read