User Tools

Site Tools


ubuntu:tty:kill_a_tty_session

Ubuntu - TTY - Kill a TTY Session

1. Check who is connected to the tty:

w

result:

08:50:26 up 152 days, 15:53,  2 users,  load average: 0.00, 0.02, 0.01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    wks1 08:27    0.00s  0.04s  0.00s w
root     pts/2    wks1 Mon09   15:41m  0.17s  0.17s -bash

2. Verify its PID

ps -u root |grep -i pts/2

3. kill the connection

kill -9 <PID>
ubuntu/tty/kill_a_tty_session.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki