PC/OpenSystems LLC is pleased to announce the latest release update for
ntksh (KornShell for Windows) — version 93u+m/4.0.20 (Release Update: December 1, 2026).
With this release we have fixed a few edge case issues people had with our initial release. While not a huge release a very important one. You can get more information and download from our Github Page
What is ntksh?
ntksh is a native, standalone, zero-dependency KornShell (AT&Tksh93u+mcompatible) runtime and embedded BSD coreutils engine built from the ground up for Windows NT (x86_64-pc-windows-msvc) — with no Cygwin, MSYS2, MinGW, or WSL translation layer required.
New Feature: Native Interactive top Utility
This release integrates a full-featured, Win32-native top process, CPU, and memory monitor directly into ntksh, complete with REPL tab-completion, built-in help index entries, and updated documentation in command_reference.md and user_guide.md.
-
Authentic Command-Line Switches:
Supports
-b(batch mode),-c(command-line / full path toggle),-d SECS/-s SECS(update interval),-E/-e SCALE(k/m/g/tmemory scaling),-H(thread counts),-i(hide idle processes),-n NUM(iteration limit),-o FIELD(sort by%CPU,%MEM,PID,TIME+,RES,VIRT,SHR,USER,COMMAND,THR, with-reverse prefix),-p PID,...(PID filter list),-S(cumulative CPU time),-u/-U USER(user filter),-1(per-CPU / aggregate view),-w [COLS](width override),-h/--help//?, and-v/-V/--version. -
Interactive Controls:
q/Esc/Ctrl+C(quit),Space/Enter(refresh),P/M/T/N(sort by%CPU/%MEM/TIME+/PID),R(reverse sort),i(idle toggle),c(cmdline toggle),H(threads toggle),1(per-CPU toggle),k(kill PID),r(renice PID), andh/?(help overlay). -
Flicker-Free Win32 Console Rendering:
Uses the alternate screen buffer (
\x1b[?1049h), cursor hiding (\x1b[?25l), per-line end-clear (\x1b[K), and single-buffer atomicWriteConsoleWoutput with dynamic row clamping to eliminate screen blinking.
# Launch interactive system monitor sorted by memory usage
top -o %MEM
# Capture 3 batch snapshots at 2-second intervals for a specific user
top -b -n 3 -d 2 -u Administrator
Core Shell & Expansion Fixes
-
Fixed
set -e --so positional parameters are cleared instead of dumping the environment. -
Fixed shortest prefix/suffix parameter trim edge cases (
${x#*},${x%pat}). -
Fixed
test/[literal=matching versus[[pattern==matching.
Text, AWK & Embedded BSD Utility Improvements
-
Fixed
sort -udeduplication of sorted lines. -
Fixed
awk/regex/pattern rule evaluation andexithandling inside functions. -
Implemented and hardened
grep -I/-U,diff -p,stat -L/-c,leavetime validation,mkfifo,whoami /groups&/privtoken privilege queries,od -b1-byte octal output,unitslength conversion without storage unit collision, andjotunsafe%sformat specifier rejection.
Verification, Security & Documentation
-
Verified with both AddressSanitizer/UBSan (
build.ps1 -GenerateAmalgamation -ASan) and the hardened release build (build.ps1) with a 100% pass rate ontests/run_tests.ps1. - Built with enterprise-grade Windows exploit mitigations: Control Flow Guard (CFG), Intel CET Shadow Stack, High-Entropy 64-bit ASLR, and DEP.
-
Updated built-in
helpoutput,command_reference.md, anduser_guide.md(includinginstaller/copies) withtopsyntax, switches, and usage examples.
Links & Licensing
ntksh is open-source software released under the BSD 3-Clause License by PC/OpenSystems LLC.
- Source Repository: github.com/rjdohnert/ntksh