Skip to content

NoCoderRandom/killall-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

killall — Windows Process Termination Tool

A fast, feature-rich killall command for Windows 11, written in C++. Kill processes by name, pattern, port, DLL, window title, CPU/RAM usage, and more.


Features

Capability Description
Pattern matching Exact, substring, glob (*/?), regex (/pattern/)
Process tree Kill a process and all its children with --tree
Port targeting Kill whatever is holding a port or port range
DLL/module matching Kill processes that have a specific DLL loaded
Window title Kill by visible window title
CPU hog Sample and kill processes exceeding a CPU threshold
RAM hog Kill processes over a memory limit
Hung apps Detect and kill frozen/unresponsive windows
LLM/AI killer Kills Ollama, LM Studio, Fooocus, KoboldCPP, etc.
Game killer Kills Steam, Epic, Xbox, Ubisoft Connect, and running games
Restart Kill and relaunch a process
Self-protection Never kills itself
Colour output ANSI colour with dry-run safety net

Quick Start

Download killall.exe from Releases, drop it anywhere in your PATH, done.

Or build from source — see Building.


Usage

killall <pattern> [options]
killall <subcommand> [options]

Pattern Matching

Syntax Type Example
notepad Substring (case-insensitive) matches notepad.exe
note* Glob wildcard matches notepad.exe, notepadpp.exe
/^steam/ Regex matches processes starting with steam

Options

-t, --tree            Kill process and all its children
-f, --force           Skip confirmation prompt
-n, --dry-run         Show what would be killed without killing
--cmdline <pat>       Match command-line substring or /regex/
--module <dll>        Match processes with a specific DLL loaded
--port <N|A-B>        Match processes using a TCP/UDP port or range
--window <title>      Match by visible window title (substring or /regex/)
--parent <pid|name>   Match children of a specific parent process
--top <N>             Limit ramhog/cpuhog to top N offenders
--sample <N>          CPU sampling duration in seconds (default: 2)
-h, --help            Show help

Subcommands

hung                  Kill hung/frozen applications
networkapps           Kill all processes with network connections
ramhog <MB>           Kill processes using more than N MB of RAM
cpuhog <percent>      Kill processes using more than N% CPU (per core)
gpu [--threshold N]   Kill processes using the GPU
llm                   Kill local AI/LLM processes
game                  Kill games, launchers, and gaming services
restart <name>        Kill a process then relaunch it

Examples

:: Kill all Notepad windows
killall notepad

:: Kill Chrome and every child process it spawned
killall chrome --tree

:: See what's on port 8080 before killing it
killall --port 8080 --dry-run
killall --port 8080 --force

:: Kill anything holding a port range
killall --port 3000-3010 --force

:: Kill by command-line content (useful for Python scripts)
killall --cmdline fooocus --force
killall --cmdline /server\.py$/ --force

:: Kill processes with a specific DLL loaded
killall --module msedge.dll --dry-run

:: Kill by window title
killall --window "Untitled" --force

:: Kill all children of a process
killall --parent explorer --dry-run

:: Kill the top 3 RAM hogs over 500 MB
killall ramhog 500 --top 3 --dry-run

:: Kill CPU hogs over 80% (per core), sampling for 3 seconds
killall cpuhog 80 --sample 3 --top 5

:: Kill all local LLMs (Ollama, LM Studio, KoboldCPP, Fooocus, etc.)
killall llm --force

:: Kill all games and launchers (Steam, Epic, Xbox, Ubisoft, etc.)
killall game --force

:: Kill and restart a process
killall restart explorer

:: Kill hung/frozen applications
killall hung --force

LLM / AI Detection

killall llm detects AI processes by:

  • Process name: ollama, lm studio, koboldcpp, jan, gpt4all, oobabooga, localai, vllm, whisper, and more
  • Command line: .gguf, .ggml, .safetensors, .ckpt model files
  • Command line: fooocus, comfyui, webui.py, stable-diffusion, invokeai, kohya, and others

Game Detection

killall game detects games by:

  • Process name: steam, epicgameslauncher, xboxpcapp, upc, galaxyclient, blizzard, eadesktop, riotclientservices, minecraft, and more
  • Loaded DLLs: steam_api64.dll, unityplayer.dll, easyanticheat.dll, nvngx_dlss.dll, bink2w64.dll, and others

Building

Requirements

  • Windows 10/11
  • Visual Studio 2022 with Desktop development with C++ workload (or just the free Build Tools for Visual Studio 2022)

Build

git clone https://github.com/YOUR_USERNAME/killall-windows
cd killall-windows
build.bat

Install

:: Run as Administrator for system-wide install (System32)
:: Or run as normal user for per-user install (~\AppData\Local\Programs\killall)
install.bat

How It Works

Feature Windows API Used
Process enumeration CreateToolhelp32Snapshot
Process termination TerminateProcess
Process tree PROCESSENTRY32.th32ParentProcessID traversal
Command line WMI Win32_Process.CommandLine
Loaded modules CreateToolhelp32Snapshot (TH32CS_SNAPMODULE)
Network ports GetExtendedTcpTable / GetExtendedUdpTable (IPv4 + IPv6 + UDP)
Window title EnumWindows + GetWindowText
Hung detection SendMessageTimeout(WM_NULL, 2000ms)
Memory usage GetProcessMemoryInfo
CPU usage Two-snapshot GetProcessTimes delta
GPU detection Checking for D3D/DXGI/Vulkan/CUDA DLL presence
Process restart QueryFullProcessImageNameW + ShellExecuteA

Notes

  • Processes running as SYSTEM (e.g. gamingservices.exe, steamservice.exe) require running killall as Administrator to terminate
  • killall never kills its own process (self-protection built in)
  • All pattern matching is case-insensitive
  • cpuhog reports per-core CPU percentage (same as Task Manager per-process view)

License

MIT

About

killall for Windows 11 — kill processes by name, port, DLL, CPU/RAM, LLM, games, and more

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors