Fkill-cli is a free, open source, convenient and cross-platform command line tool developed using Nodejs. It can interactively terminate Linux processes. Supports running on Windows and MacOS X operating systems and requires a process ID (PID) or process name to terminate it.
To install the fkill cli tool in Linux, install Nodejs and NPM first. To install Nojejs and NPM in Debian/Ubuntu:
--------------- Install Noje.js 8 ---------------
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt install -y nodejs
--------------- or Install Noje.js 10 ---------------
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt install -y nodejs
Install Nojejs and NPM in CentOS/RHEL and Fedora:
--------------- Install Noje.js 8 ---------------
$ curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
$ sudo yum -y install nodejs
--------------- or Install Noje.js 10 ---------------
$ curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
$ sudo yum -y install nodejs
With Nodejs and NPM packages installed, you can use the npm command to install the fkill-cli package with this option so that it can be installed globally.
$ sudo npm install -g fkill-cli
After installing fkill-cli on the system, use the fkill command to start in interactive mode and run without any parameters. Select the process you want to terminate and press Enter:
$ fkill
You can also provide PID or process names from the command line, and process names are case insensitive, here are some examples.
$ fkill 1337
$ fkill firefox
To disable a port, you only need to add a colon before the port, such as:
$ fkill:18888
Use the f flag to enforce the operation and v to allow display of process parameters.
$ fkill -f 1337
$ fkill -v Firefox
More information a