Skip to content
Related Articles

Related Articles

Improve Article

Easy way to kill process using Fkill in Linux

  • Last Updated : 23 Aug, 2021

fkill-cli is a command-line-based tool to kill processes interactively. Fkill is developed using Nodejs. It can run on different operating systems like macOS, Linux, and windows. To kill the process using fkill we just have to mention the process name or the process PID. Fkill can also be used to kill port.

Installation of fkill

Now let’s see how we can install the fkill on systems. The requirement to install fkill is NodeJS, so first, we need to install the nodejs. Use one of the following commands to install NodeJS according to your OS:

For Debian/Ubuntu:

apt-get install node

For Arch Linux:

pacman -S nodejs

For Fedora 

dnf install nodejs

For OSX

brew install node

Note: For window, refer to installation of Node.js on Windows.

Now we have installed the npm on our systems. Now to install the fkill use npm. NPM is a package manager for nodes. To install the fkill using npm use -g option with npm command which install fkill globally.



sudo npm install -g fkill-cli

We have installed the fkill-cli tool. Now let’s see how to use fkill.

Usage

Use fkill command to launch the fkill in interactive mode without providing any argument. Then this will show you available processes and search the process which you want to kill and then hit enter to kill or use the arrow key to select the process.

Using fkill to kill the process using PID

If you want to kill the process using PID with fkill then mention the PID after the fkill command.

fkill PID

Example:

fkill 19467

Using fkill to kill the process using process name

If you want to kill the process using the process name, then mention the process name after the fkill command:

fkill process_name

Example:

fkill vim

Use fkill to kill the port

If you want to kill the process running on the port, then just mention the port number with a colon (:) after the fkill command:

fkill :3000

To forcefully kill the process, use -f option with fkill command.

fkill -f 1222

To show process arguments use the -v option with fkill command.

fkill -v firefox

To see the help message of fkill command, use the –help option with fkill command.

fkill --help

My Personal Notes arrow_drop_up
Recommended Articles
Page :