Linux kill all active process except your login session with killall5 command
Almost all UNIX SystemV version has killall command which is used to kill all active processes i.e. terminates all processes with open files so that the mounted file systems will be unbusied and can be unmounted.
However Linux killall command used to kill processes by name (if no signal name is specified, SIGTERM is sent). If you missed old good SysV killall command, try killall5 command under any Linux distro. killall5 is nothing but the UNIX SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it won’t kill the shell that is running the script it was called from.
Just type killall5 and every active process will get killed except your login session:
# netstat
# netstat -tulpn
# killall5
# netstat -tulpn
As usual,
(a) The killall command can be run only by the super-user.
(b) Use this command with caution
You may also be interested in other helpful articles:
- Solaris > Forcefully unmount the cdrom/floppy disk
- Howto: Linux kill and logout users
- Linux Disable the Ctrl-Alt-Delete shutdown keys
- Understanding UNIX process creation
- ktrace - FreeBSD / Mac OS X Process Tracing and Reporting Tool
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: active_process, active_processes, kernel_threads, killall5_command, open_files, signal_name, UNIX



Recent Comments
Yesterday ~ 24 Comments
Yesterday ~ 24 Comments
Yesterday ~ 3 Comments
Yesterday ~ 2 Comments
09/05/2008 06:08 pm (2 days ago) ~ 16 Comments