Easy way to kill process using Fkill in Linux
Last Updated :
08 Jun, 2023
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 on Different OS.
Now let's see how we can install the fkill on systems. The requirement to install fkill is NodeJS and npm, so first, we need to install the nodejs. Use one of the following commands to install NodeJS according to your OS:
For Debian/Ubuntu:
sudo apt-get install nodejs npm
For Arch Linux:
sudo pacman -S nodejs npm
For Fedora / Red Hat 8,9
sudo dnf install nodejs npm
For OSX
sudo brew install nodejs npm
For Windows
Open command prompt or powershell of windows with administratie privileges.
Run the following command:
curl -o nodejs.msi https://nodejs.org/dist/v14.17.0/node-v14.17.0-x64.msi
This will install a 64-bit version of Node.js, if you want to change it you can refer to the official site to pick up the links for download according to your requirement.
Now run the nodejs installer from cli
msiexec /i nodejs.msi /qn
Here `/qn` will run the installer silently without showing the GUI interface, to see the GUI installer interface, just run the same command without `/qn`
Installing of fkill in Linux (Ubuntu)
1) Installing nodejs and npm
sudo apt install nodejs npm
sudo apt install nodejs npm
2) Installing the fkill using npm use -g option with npm command which install fkill globally.
sudo npm install -g fkill-cli
sudo npm install -g fkill-cli
3) To see the usage and options
Use fkill -h 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.
fkill -h
fkill -hHow to use 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
How to Terminate a Process (pkill) 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
How to 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
fkill --helpConclusion
fkill-cli is a useful command line tool that allows users to kill processes interactively. This article provides clear instructions for how we can install nodejs and npm on various operating systems and also the installation of fkill globally using npm. We have also discussed about how to kill process running on a specific port and how to kill a process with process name, port and using PIDs.
Similar Reads
How to Kill a Process in Linux | Kill Command
kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process that terminates the process. If the user doesn't specify any signal that is to be sent along with the kill command, then a default TERM signal i
6 min read
Exit status of a child process in Linux
It is known that fork() system call is used to create a new process which becomes child of the caller process. Upon exit, the child leaves an exit status that should be returned to the parent. So, when the child finishes it becomes a zombie.Whenever the child exits or stops, the parent is sent a SIG
3 min read
How to kill processes on the Linux Desktop with xkill
xkill is a command-line utility that can kill the undesired windows on the user's screen. Basically, xkill force the X server to close the connection to the client. This utility kills the programs without providing PID with a command. Now let's see how to install the xkill on the systems. Installati
4 min read
How to Kill a Process Running on Particular Port in Linux?
Have you ever tried to launch a web server, database, or application in Linux, only to be stopped by the frustrating âAddress already in useâ error? This happens when another process is already occupying the required port, preventing your application from running. Freeing up the port is crucial to e
6 min read
How to Find Hidden Processes in Linux
Hidden or unlisted running processes in Linux can indicate issues like misconfigured applications or potential security threats, including malware or rootkits. Identifying and addressing these hidden processes is crucial for maintaining a secure and efficient system. This guide provides simple and a
5 min read
Process Control Commands in Unix/Linux
Process control commands in Unix are: bg - put suspended process into background fg - bring process into foreground jobs - list processes bg Command : bg is a process control command that resumes suspended process while keeping them running in the background. User can run a job in the background by
3 min read
How to Kill Processes by Given Partial Names in Linux
On a Unix system creates a separate environment for a program when it is executed. Everything the system needs to run the program as if there were no other programs in this environment. In Unix, each command you issue initiates or starts a new process. You initiated a process using the ls command to
4 min read
Batch Script - Process in Linux
A Batch Script is basically a script having commands which execute sequentially. It helps users to perform repetitive tasks without human or user intervention or input. To automate some tasks like loading processes, and killing processes. Now in this article, we will write a batch script to view all
2 min read
How to Kill a Detached screen Session in Linux
The screen session is like virtual windows, And in Linux it works like a multiplexer terminal where we can create more than one window and work on that. we can create multiple windows inside one session. We called it virtual because the process will continue to run when their window will not be visi
3 min read
Processes in Linux/Unix
A program/command when executed, a special instance is provided by the system to the process. This instance consists of all the services/resources that may be utilized by the process under execution. Whenever a command is issued in Unix/Linux, it creates/starts a new process. For example, pwd when i
6 min read