LinuxCommandLibrary

fkill

Kill processes interactively

TLDR

Run without arguments to use the interactive interface

$ fkill
copy

Kill the process by PID, name or port
$ fkill [pid|name|:port]
copy

SYNOPSIS

fkill [pid|name|:port ...] [options]
fkill (for interactive mode without arguments)

PARAMETERS

--force, -f
    Forcefully kill the process.

--verbose, -v
    Output more information during execution.

--signal |
    Specify the signal to send (e.g., SIGKILL, SIGTERM, or 9, 15).

--exact, -e
    Perform an exact match for process names, disabling fuzzy search.

--no-interactive, -n
    Disable the interactive selection menu when multiple processes match.

--no-spinner
    Disable the progress spinner.

--help, -h
    Display help information and exit.

--version
    Display the version number and exit.

DESCRIPTION

fkill is a powerful and user-friendly command-line utility designed for effortlessly terminating processes across various operating systems, including Linux, macOS, and Windows. Unlike native kill commands, fkill provides an interactive mode with fuzzy matching, making it incredibly easy to locate and select the desired process to terminate. It supports killing processes by Process ID (PID), process name, or even by the port they are listening on. This cross-platform consistency and intuitive interface significantly streamline process management, especially when dealing with multiple running applications or when unsure of the exact process name or PID. Built as a Node.js CLI tool, fkill offers a modern and efficient way to manage system processes.

CAVEATS

fkill is not a standard Linux utility and must be installed separately, typically via npm (Node Package Manager).
For terminating system-level processes or those owned by other users, fkill might require elevated privileges (e.g., running with sudo).
While cross-platform, its behavior relies on underlying OS commands, and subtle differences in process handling might exist compared to native tools.

INSTALLATION

fkill is a Node.js package and can be installed globally using npm or yarn:
npm install --global fkill-cli
yarn global add fkill-cli

USAGE EXAMPLES

Kill a process by PID: fkill 12345
Kill all processes named 'node': fkill node
Kill a process listening on port 3000: fkill :3000
Enter interactive mode to select a process: fkill
Force kill a process by name without interaction: fkill -f chrome
Kill a process using SIGTERM by its PID: fkill --signal SIGTERM 67890

HISTORY

fkill-cli was created by Sindre Sorhus, a prominent developer in the Node.js ecosystem, known for numerous open-source projects. It emerged as a solution to provide a consistent and user-friendly cross-platform process termination tool, addressing the varied and often less intuitive native commands across operating systems. Its development has focused on a robust, interactive, and fuzzy-matching experience, making it a popular choice for developers and system administrators seeking a modern alternative to traditional kill commands.

SEE ALSO

kill(1), pkill(1), pgrep(1), htop(1), lsof(8)

Copied to clipboard