System administration: Difference between revisions

→‎Debian/Ubuntu-specific: Security - denyhosts
Line 183: Line 183:
</syntaxhighlight>
</syntaxhighlight>


== Kill other user terminal sessions ==
*Tested on: Ubuntu 14.04.5 Trusty
Sometimes it is necessary to kill other remote sessions that have been '''zombified'''.
* First determine your own shell
<source lang="bash">
$ tty
</source>
* Show all of your running processes
<source lang="bash">
$ ps -fu mhan
UID        PID  PPID  C STIME TTY          TIME CMD
mhan    21580 21469  0 19:02 ?        00:00:00 sshd: mhan@pts/2
mhan    21581 21580  0 19:02 pts/2    00:00:00 -bash
mhan    21607 21581  0 19:02 pts/2    00:00:00 screen
mhan    21608 21607  0 19:02 ?        00:00:00 SCREEN
mhan    21609 21608  0 19:02 pts/3    00:00:00 /bin/bash
mhan    21939 21609  0 19:06 pts/3    00:00:00 ps -fu mhan
mhan    21580 21469  0 19:02 ?        00:00:00 sshd: mhan@pts/2
</source>
* If I want to kill pts/2 then the PID to kill is 21580.
<source lang="bash">
$ kill -HUP 21580
</source>
Reference: https://kb.iu.edu/d/adqw (accessed on 10/5/2017)


== Setting niceness (aka priority) on Linux processes ==
== Setting niceness (aka priority) on Linux processes ==