Skip to content

Add Windows process listing command#55

Open
caomengxuan666 wants to merge 1 commit into
microsoft:mainfrom
caomengxuan666:winuxcmd/add-ntps
Open

Add Windows process listing command#55
caomengxuan666 wants to merge 1 commit into
microsoft:mainfrom
caomengxuan666:winuxcmd/add-ntps

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #54.

Adds a small native Windows ps implementation under deps/ntps. It lists running processes using the Toolhelp snapshot APIs and supports a focused set of common options:

  • ps, ps -A, ps -e
  • BSD-style ps ax / ps aux
  • -p / --pid PID filtering
  • --ppid parent PID filtering
  • -o / --format for supported columns: pid, ppid, comm / command / args, nlwp, pri
  • --no-headers

This also adds ps to the PowerShell integration rewrite list, so interactive bare ps can be routed to ps.cmd like the other coreutils commands. Get-Command ps may still show the PowerShell alias, matching the existing README caveat for other rewritten commands.

This is intended as a Windows-specific convenience command to pair with kill, not as a full procps replacement.

Verified with:

  • cargo test --target x86_64-pc-windows-msvc -p uu_ps
  • cargo check --target x86_64-pc-windows-msvc --bin coreutils
  • cargo build --target x86_64-pc-windows-msvc
  • cargo test --target x86_64-pc-windows-msvc
  • smoke-tested coreutils.exe --list, ps, ps -A, ps -e, ps aux, ps -p, ps --ppid, ps -o, ps --no-headers, and ps --help

@lhecker lhecker added the C-feature Feature requests and any other major tasks. label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-feature Feature requests and any other major tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Windows process listing command ps

2 participants