Native Windows Linux-style commands | ~900KB single binary | No WSL required | Windows commands and Linux-style filters work together
WinuxCmd is built for one practical goal: make common Linux command workflows work naturally on Windows terminals.
- Native Windows executable (
winuxcmd.exe), no WSL required - Linux-style commands and flags (
ls,grep,sed,ps,lsof, ...) - Fast startup and small footprint
- Works well with AI-generated shell commands
- Cross-tool pipelines between Windows and Linux-style commands
| Feature | Value |
|---|---|
| Windows × Linux pipeline interoperability | netstat -ano | grep 8080 works out of the box |
| Small footprint | ~900KB single executable with on-demand links |
| Fast execution | Millisecond-level command execution in common workflows |
| Smart completion | Built-in commands + Windows command whitelist + user-defined entries |
| Shell-aware fallback | Parent shell detection (cmd vs PowerShell/pwsh) |
irm https://dl.caomengxuan666.com/install.ps1 | iex- Download from Releases
- Extract to any folder
- Enter
binand run:
.\create_links.ps1Optional:
.\create_links.ps1 -UseSymbolicLinks
.\create_links.ps1 -Removewinuxcmd ls -la
winuxcmd grep -n "TODO" README.md
winuxcmd help
winuxcmd help sortAfter links are created, you can call commands directly:
ls -la
grep -n "TODO" README.md- Entered from
PowerShell/pwsh: unknown commands fallback through PowerShell - Entered from
cmd: unknown commands fallback through cmd - PowerShell completion entries (for example
Get-Process,Where-Object) are enabled only in PowerShell sessions
WinuxCmd provides a C Foreign Function Interface (FFI) for integration with other languages and applications.
winux_execute()- Execute commands via daemon with zero start-up overheadwinux_get_all_commands()- Retrieve all available command nameswinux_is_daemon_available()- Check if daemon is runningwinux_get_version()- Get WinuxCmd version stringwinux_free_buffer()- Free allocated memorywinux_free_commands_array()- Free command array allocated by winux_get_all_commands()
#include "ffi.h"
int main() {
// Check daemon availability
if (!winux_is_daemon_available()) {
printf("Daemon not available\n");
return 1;
}
// Get all available commands
char** commands = NULL;
int count = 0;
if (winux_get_all_commands(&commands, &count) == 0) {
printf("Available commands:\n");
for (int i = 0; i < count; i++) {
printf(" %s\n", commands[i]);
}
winux_free_commands_array(commands, count);
}
// Execute a command
char* output = NULL;
char* error = NULL;
size_t output_size = 0;
size_t error_size = 0;
int exit_code = winux_execute("ls", NULL, 0, NULL,
&output, &error,
&output_size, &error_size);
if (output) {
fwrite(output, 1, output_size, stdout);
winux_free_buffer(output);
}
if (error) {
winux_free_buffer(error);
}
return 0;
}See examples/ffi/ffi_example.c for a complete example. The FFI library (winuxcore.dll) is built when BUILD_FFI=ON is set.
Add this to your PowerShell profile ($PROFILE) to auto-enter WinuxCmd for interactive terminal sessions:
# Automatically entering winuxcmd REPL env.
$cliArgs = [Environment]::GetCommandLineArgs() | ForEach-Object { $_.ToLowerInvariant() }
$isNonInteractiveLaunch = ($cliArgs -contains '-command') -or ($cliArgs -contains '-c') -or ($cliArgs -contains '-file') -or ($cliArgs -contains '-f')
$isRealTerminal = $env:WT_SESSION -or $env:TERM_PROGRAM
if ($Host.Name -eq 'ConsoleHost' -and -not $isNonInteractiveLaunch `
-and $env:WINUXCMD_BOOTSTRAPPED -ne '1' -and $isRealTerminal) {
$env:WINUXCMD_BOOTSTRAPPED = '1'
$winuxExe = (Get-Command winuxcmd -ErrorAction SilentlyContinue).Source
if (-not $winuxExe) {
$devExe = 'your\winuxcmd.exe\path' # replace with your local path
if (Test-Path $devExe) {
$winuxExe = $devExe
}
}
if ($winuxExe -and (Test-Path $winuxExe)) {
& $winuxExe
}
}Replace $devExe with the actual local path to your winuxcmd.exe.
Using a registry AutoRun hook for cmd is risky: it also affects background usages such as cmd /c and Run dialog launches, and can force unexpected interactive WinuxCmd sessions.
Recommended approach:
- If you entered from plain cmd, manually run
winuxcmdto enter the completion-enabled interactive environment. - Avoid cmd
AutoRunregistry hooks: they also affect non-interactive/background calls such ascmd /c. - Prefer Windows Terminal, and launch cmd with:
%SystemRoot%\System32\cmd.exe /k winuxcmd
WinuxCmd supports user-defined completion entries.
- Default file:
%USERPROFILE%\.winuxcmd\completions\user-completions.txt - Override path via env var:
WINUXCMD_COMPLETION_FILE
Example format:
cmd|git|Distributed version control
opt|git|pull|Fetch from and integrate with another repository
Template file:
scripts/user-completions.sample.txt
netstat -ano | grep 8080
tasklist | grep -i chrome
ipconfig | grep -i "ipv4"
ps -ef | grep winuxcmd137 commands are currently implemented. See full compatibility and option details:
Full execution benchmark (startup + execution + exit), 1000-file directory, 20 runs per command.
| Command | WinuxCmd (ms) | uutils (Rust) (ms) | Winner |
|---|---|---|---|
| ls | 6.30 | 7.27 | WinuxCmd |
| cat | 6.19 | 7.01 | WinuxCmd |
| head | 6.27 | 6.79 | WinuxCmd |
| tail | 6.34 | 6.84 | WinuxCmd |
| grep | 6.42 | 5.99 | uutils |
| sort | 6.31 | 7.27 | WinuxCmd |
| uniq | 6.23 | 6.84 | WinuxCmd |
| wc | 6.21 | 6.81 | WinuxCmd |
Summary:
- WinuxCmd wins in 7/8 commands
- Average time: WinuxCmd 6.28ms vs uutils 6.85ms
- Overall: about 1.09x faster
Benchmark details and notes:
- Stabilize Linux-style core commands on Windows
- Improve REPL fallback correctness for cmd/PowerShell
- Keep binary size and startup performance targets
- Better completion relevance and ranking
- More compatibility fixes for mixed Windows/Linux pipelines
- Improved test coverage for shell-edge scenarios
- Better integration docs and templates
- Contributor tooling and automation improvements
- Long-term cross-platform abstraction planning
A: No. WinuxCmd complements PowerShell. Use whichever syntax is best for the task.
A: Unknown commands are intentionally routed to the parent shell environment for compatibility.
A: Yes. Use %USERPROFILE%\.winuxcmd\completions\user-completions.txt or set WINUXCMD_COMPLETION_FILE.
A: Windows handle/process visibility depends on privilege level. WinuxCmd degrades gracefully and reports partial-result warnings instead of crashing.
- Many users in daily usage scenarios
- Limited contributor capacity
- Strong need for focused, high-quality contributions
If you want to help, the most valuable areas are:
- Bug fixes for shell compatibility
- Test coverage for REPL/fallback behavior
- Documentation clarity and examples
MIT License (c) 2026 caomengxuan666. See LICENSE.

