Fkill, stands for Fabulous Kill, is a cross-platform command line utility to interactively search and kill multiple processes at once. Usually, I use "top" command or "ps -ef | grep <process_name>" or "pidof <process_name>" to find the process id and kill it with command "kill -9 <PID>". I don't know about you, but this is what I was doing until I came across this gem. The Fkill program can able to find the running processes and kill one or more processes if you want to. It is written using Nodejs and it supports Linux, Mac OS and Microsoft Windows.
$ yay -S fkill
On other Linux distributions, make sure you have installed Nodejs as described in the below link.
After installing Nodejs, run the following command to install fkill.
$ npm install --global fkill-cli
Interactively Search And Kill Multiple Processes Using Fkill On Linux
To search and kill a process, simply run:
This command will launch interactive UI where you can find the list of the running processes along with their port numbers. Use UP/DOWN arrows to select a process hit ENTER to kill it. You can also type the first few letters of a process name and pick the process from the list and hit ENTER to kill it.
To exit the interactive UI, press CTRL+c.
If you already know the port number, for example 2236, then you can directly kill it using command:
$ fkill 2236
You can kill multiple processes at once by specifying the port numbers with space-separated.
$ fkill 2237 2312
It is also possible to kill a port. To kill a port (e.g. 3306), just prefix it with a colon like below.
$ fkill :3306
To get help, run:
$ fkill --help Fabulously kill processes. Cross-platform. Usage $ fkill [<pid|name|:port> …] Options --force -f Force kill --verbose -v Show process arguments --silent -s Silently kill and always exit with code 0 Examples $ fkill 1337 $ fkill safari $ fkill :8080 $ fkill 1337 safari :8080 $ fkill To kill a port, prefix it with a colon. For example: :8080. Run without arguments to use the interactive interface. The process name is case insensitive.