Skip to content

Instantly share code, notes, and snippets.

View xontik's full-sized avatar

Benjamin Borlet xontik

View GitHub Profile
@xontik
xontik / linux-kill-pts.md
Created June 27, 2020 20:39 — forked from holmberd/linux-kill-pts.md
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
#!/bin/bash
#from :
#https://gist.github.com/deviantony/2b5078fe1675a5fedabf1de3d1f2652a
#https://gist.github.com/tancou/adbdacd1aa1d3afc68c2d877c6ef353c
apt update -y
apt install curl -y
apt install qemu-guest-agent -y