| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| README.md | < 11 hours ago | 17.9 kB | |
| GNU GENERAL PUBLIC LICENSE.txt | < 11 hours ago | 1.9 kB | |
| build.ps1 | < 11 hours ago | 1.6 kB | |
| CMakeLists.txt | < 11 hours ago | 270 Bytes | |
| wnus.exe | < 11 hours ago | 5.6 MB | |
| test_tilde.sh | < 11 hours ago | 29 Bytes | |
| wnus.cpp | < 11 hours ago | 1.2 MB | |
| test_ncal_fix.ps1 | < 11 hours ago | 322 Bytes | |
| test_ncal_whoami.ps1 | < 11 hours ago | 882 Bytes | |
| test_new_commands.bat | < 11 hours ago | 437 Bytes | |
| test_script.sh | < 11 hours ago | 171 Bytes | |
| test_sed_xargs.ps1 | < 11 hours ago | 577 Bytes | |
| test_sort_cut_paste.cmd | < 11 hours ago | 847 Bytes | |
| test_id_uname.ps1 | < 11 hours ago | 728 Bytes | |
| test_man.cmd | < 11 hours ago | 445 Bytes | |
| test_mount_date.ps1 | < 11 hours ago | 627 Bytes | |
| test_alias_script.cmd | < 11 hours ago | 68 Bytes | |
| test_awk.cmd | < 11 hours ago | 342 Bytes | |
| test_awk.ps1 | < 11 hours ago | 619 Bytes | |
| test_history.cmd | < 11 hours ago | 465 Bytes | |
| MANUAL.md | < 11 hours ago | 66.0 kB | |
| smoke_tests.ps1 | < 11 hours ago | 1.6 kB | |
| Totals: 22 Items | 6.9 MB | 1 |
Windows Native Unix Shell (wnus) - Version 0.0.9.6
A comprehensive Unix/Linux-like shell environment for Windows, implemented entirely in C++ without external dependencies. Windows Native Unix Shell brings the power and familiarity of bash commands to native Windows, with full NTFS support and Windows API integration.
๐ Overview
Windows Native Unix Shell (wnus) is a standalone bash-like console application for Windows that provides: - 276+ commands with 276+ fully implemented - Native Windows integration using NTFS file system and Windows APIs - No external dependencies - no WSL, Git Bash, Cygwin, or other installations required - Full bash compatibility for common command-line workflows including I/O redirection and process control - Comprehensive documentation with man pages for every command
โจ Key Features
Core Capabilities
- ๐ง 276+ Unix/Linux commands implemented natively in C++
- ๐ Native NTFS support with Windows ACL integration
- ๏ฟฝ๏ธ Virtual root filesystem (wnus:/) with unified drive access via /C, /D, etc.
- ๏ฟฝ๐ Full pipe operations (
|) for command chaining - ๐ Command chaining with
&&(AND) and||(OR) operators - ๐ค I/O redirection with
>,>>, and<operators - ๐ Background processes with
&operator - โจ๏ธ Interactive tab completion for commands and file paths
- ๐ Persistent command history with search capabilities
- ๐ Configurable command aliases for personalized workflows
- ๐ Comprehensive man page system for detailed command documentation
- โ Context-sensitive help (
--helpflag for all commands) - ๐ Process control with Ctrl+C (terminate) and Ctrl+Z (suspend)
Advanced Features
- ๐ Windows ACL integration via chmod, chown, chgrp
- ๐ Hard and symbolic links with native NTFS support
- ๐ Network operations including SSH, SCP, rsync, wget, curl
- ๐ฆ Archive management with tar, gzip, zip support
- ๐ป Process management with ps, top, kill, nice commands
- ๐ฅ User/group management with Windows account integration
- ๐ Service control for Windows services
- ๐ Shell scripting with sh command and source support
- ๐งฎ Built-in calculators (bc, calc, qalc)
๐ Quick Start
Prerequisites
- Windows 7 or later (Windows 10/11 recommended)
- C++ compiler (MSVC, MinGW, or Clang)
- ~5.5 MB disk space for executable
- ~15 MB RAM minimum for typical usage
Building
Using PowerShell build script (recommended):
.\build.ps1
Using CMake:
mkdir build
cd build
cmake ..
cmake --build . --config Release
Using MSVC directly:
cl /EHsc /O2 garyscon.cpp /Fe:wnus.exe user32.lib shell32.lib advapi32.lib ws2_32.lib iphlpapi.lib netapi32.lib
Running
wnus.exe
Or for single command execution:
wnus.exe -c "ls -la"
๐ Command Reference
Navigation & File Viewing (8 commands)
pwd- Print working directorycd [dir]- Change directoryls [-la] [path]- List directory contentscat <file>...- Display file contentsless <file>- View file with paginghead [-n N]- Display first N linestail [-n N]- Display last N linestac <file>- Print files in reverse line order
File Operations (14 commands)
touch,mkdir,rm,rmdir,mv,rename- Basic file operationsln [-s],unlink- Create/remove linkschmod,chown,chgrp- Permission managementdd- Low-level file copyfile,blkid- File/device information
Text Processing (21 commands)
grep,egrep,sed,awk- Pattern matching and text processingsort,cut,paste,uniq- Text manipulationwc,tee,diff,patch- Text utilitiescmp,sdiff,rev,printf,echo,yes,seq,jot,factor- Text output and generators
Text Formatting & Analysis (18 commands)
fmt- Reformat paragraph textfold- Wrap text to specified widthpr- Paginate text with headerslpr,lp- Send jobs to printer (stubbed)expand- Convert tabs to spacesunexpand- Convert spaces to tabsod- Octal/hexadecimal dumphexdump,hd- Hex dump with ASCIIstrings- Extract printable strings from binary filescolumn- Format output into columnscomm- Compare sorted filesjoin- Join lines on common fieldlook- Display lines beginning with stringtsort- Topological sortvis,unvis- Display/reverse non-printable characterstac- Print files with lines in reverse order
Encoding & Checksums (6 commands)
base64- Base64 encode/decodemd5sum- MD5 checksumsha1sum- SHA1 checksumsha256sum- SHA256 checksumcksum- CRC checksumsum- Checksum and block count
File Search (4 commands)
find- Find files/directorieslocate- Recursive searchwhich- Locate command in PATHfile- Determine file type
System Info (19 commands)
df,du- Disk usageuptime,uname,date- System informationcal,ncal- Calendar displayfree,vmstat,iostat,mpstat- System statisticshostname,hostid,arch,nproc,lsb_release- Host identifiersneofetch,sysctl- Host information and tunables
User & Group (23 commands)
whoami,who,w,last,id- User informationfinger,user,groups- User detailslogname,users- Session user reportingpasswd- Password managementuseradd,userdel,usermod- User administrationgroupadd,groupmod,groupdel- Group administrationgpasswd,getent- Account managementmesg,write,wall- Local messaging controls
Process Management (23 commands)
ps,proc,htop,top- Process viewingpgrep,pidof,pstree- Process lookup and tree displaykill,killall,pkill,xkill- Process terminationnice,renice- Priority managementjobs,bg,fg- Job control (info guides)strace,lsof- Debugging (info guides)sleep,wait,timeout,nohup- Delays and timed execution
Archives & Compression (11 commands)
tar- Archive managementgzip/gunzip- Gzip compressionzip/unzip- ZIP archivesbzip2/bunzip2- Bzip2 (info guides)dd- Low-level copymake- Build automation from Makefile
File Utilities (9 commands)
cp- Copy files and directoriesdirname- Extract directory from pathnamereadlink- Display symbolic link targetrealpath- Print resolved absolute pathmktemp- Create temporary file/directoryinstall- Copy files and set attributestruncate- Shrink or extend file sizefallocate- Preallocate file spacepathchk- Validate pathnames
Network & Remote (20 commands)
ssh,scp,rsync- Remote accessftp,sftp- Connectivity probes for FTP and SSH/SFTPwget,curl- File downloadsping,traceroute- Diagnosticsip,ifconfig,iptables- Network configdig,nslookup,netstat,ss- Network infonmap,tcpdump,lspci,lsusb- Network/hardware tools Tip: For a quick FTP connectivity check, useftp -u anonymous -w anonymous@ test.rebex.net(public read-only server).
Services & System (5 commands)
service- Windows service controlshutdown,reboot- Power managementsync- File system sync
Shell & Scripting (21 commands)
sh,source,exec- Script executionecho,printf- Outputbc,calc,qalc- Calculatorsxargs- Argument processingtrue,false,tty,script,logger- Shell utilities and loggingxdg-open- Open files/URLs with default applicationalias/unalias- Command shortcutshistory- Command historyumask- File mode maskcase- Pattern matching (info)read- Read inputtest- Conditional evaluation
Editing & Display (3 commands)
nano- Text editorclear- Clear screenscreen- Terminal multiplexer (limited)
Admin & Help (6 commands)
sudo,su- Privilege elevationman- Manual pageshelp- Command listingversion- Version informationexit,quit- Exit shell
๐ Documentation
Getting Help
<command> --help # Quick command help
man <command> # Full manual page
help # List all commands
version # Show version and features
Man Pages
Every command has a comprehensive manual page with: - Name and description - Usage synopsis - Detailed options - Examples - Related commands
๐ง Usage Examples
File Operations
ls -la # List all files with details
cat file.txt | grep "error" # Search in file
find . -name "*.log" # Find log files
tar -czf backup.tar.gz data/ # Create archive
Text Processing
grep -i "warning" *.log # Case-insensitive search
sed 's/old/new/g' file.txt # Replace text
awk '{print $1}' data.txt # Extract column
sort file.txt | uniq # Sort and remove duplicates
System Operations
ps | grep chrome # Find Chrome processes
df -h # Show disk usage
uptime # System uptime
neofetch # System info display
Network Operations
ssh user@server.com # SSH connection
scp file.txt user@host:/tmp/ # Secure copy
wget https://example.com/file # Download file
ping google.com # Network test
Process Management
ps # List processes
kill 1234 # Kill by PID
killall chrome # Kill by name
nice -n 10 command # Run with priority
๐ฏ Advanced Features
Piping
ls -la | grep ".txt" | sort
cat log.txt | grep "error" | wc -l
ps | grep "chrome"
Command Chaining
mkdir test && cd test && touch file.txt # Execute if previous succeeds
rm file.txt || echo "File not found" # Execute if previous fails
make && make test && make install # Multi-step build
I/O Redirection
# Output redirection
echo "Hello" > output.txt # Write to file (overwrite)
echo "World" >> output.txt # Append to file
ls -la > filelist.txt # Save directory listing
# Input redirection
cat < input.txt # Read from file
grep "error" < log.txt # Search in file via stdin
wc -l < data.txt # Count lines from file
# Combined redirection
sort < unsorted.txt > sorted.txt # Read input, write output
cat file1.txt file2.txt > combined.txt # Merge files
Background Processes
# Run command in background
long_running_command & # Start background job
notepad & # Open notepad without blocking
# Multiple background jobs
command1 & command2 & command3 & # Run multiple jobs
# Output shows: [job_number] process_id command_line
Process Control
# Ctrl+C - Interrupt current command
# Displays: ^C
# Returns to prompt immediately
# Ctrl+Z - Suspend current process (limited support)
# Displays: ^Z
# Message about job control shown
Aliases
alias ll="ls -la"
alias ..="cd .."
unalias ll
Shell Scripts
# Create and execute script
cat > script.sh << 'EOF'
#!/bin/sh
echo "Starting..."
mkdir -p backup
cp -r data backup/
echo "Done!"
EOF
sh script.sh
Tab Completion
- Press Tab to auto-complete commands and paths
- Works for file names, directory names, and commands
Home Directory
cd ~ # Go to home
ls ~/Documents # List home documents
๐ Administrator Operations
Commands requiring admin privileges:
sudo service apache start
sudo passwd username
sudo useradd newuser
sudo shutdown -r now
Run as Administrator or use built-in sudo command.
๐ Performance
- Startup: Instant (native executable)
- Execution: Native Windows API performance
- Memory: ~5-10 MB
- Size: ~4.4 MB executable
๐ Version History
v0.0.7.6 (Current)
- Added 8 new utility commands:
cp- Copy files and directories with -r/-f/-i/-v/-p flagsdirname- Extract directory portion from pathnamesreadlink- Display symbolic link targets with -f flagrealpath- Print resolved absolute file pathsmktemp- Create temporary files/directories with random namesinstall- Copy files and set attributes with -d/-m/-v flagsfmt- Reformat paragraph text with -w flagfold- Wrap text to specified width with -s flag- Updated command count from 155 to 163 (149 fully implemented)
- Full implementations with proper error handling and all standard flags
v0.0.7.5
- Added internal
makecommand for build automation from Makefile - Implemented full Makefile parser with dependency resolution and timestamp-based rebuilding
- Added support for
-f,-C,-n, and-Bflags in make command - Added tilde (~) expansion for home directory shortcut in all path operations
- Updated pwd command to display "~" when in home directory
- Renamed project from garyscon to wnus (Windows Native Unix Shell)
- Fixed command chaining to properly isolate redirection contexts between commands
v0.0.7.4
- Added full I/O redirection support:
- Output redirection with
>(overwrite) - Append redirection with
>>(append) - Input redirection with
<(read from file) - Added background process execution with
&operator - Added process control with Ctrl+C (interrupt) and Ctrl+Z (suspend)
- Implemented background process tracking and cleanup
- Changed prompt from "gash" to "wnus" for consistency
- All redirections work with pipes and command chains
v0.0.7.3
- Added command chaining with
&&(AND) and||(OR) operators - Enhanced command execution pipeline with conditional logic
- Support for complex command sequences with multiple operators
- Improved error handling in chained command execution
v0.0.7.2
- Minor bug fixes and stability improvements
v0.0.7.1
- Added internal
read,rename,unlink,nohup,blkid,test, andegrep - Enhanced shell scripting with input reading and conditional testing
- Improved file operations with pattern-based renaming and unlinking
- Added process immunity with nohup and block device attribute display
v0.0.7.0
- Added internal
pgrep,pidof,pstree,timeout,ftp,sftp, andsysctl - Expanded process lookup/tree capabilities and timed command execution
- Added FTP/SSH connectivity probes and sysctl-style system info
v0.0.6.9
- Added internal
quota,basename,whereis,stat,type, andchattrcommands - Enhanced file attribute management and pathname manipulation
- Improved filesystem information display and command lookup utilities
v0.0.6.8
- Added internal
trap,ulimit,expr,info,apropos, andwhatiscommands - Enhanced command information and expression evaluation
- Improved signal handling compatibility and resource limit display
- Better manual page searching and command documentation
v0.0.6.7
- Added internal
printenv,export,shuf,banner,time, andwatchcommands - Enhanced environment variable management
- Added text shuffling and visual banner display utilities
- Improved command timing and execution monitoring
v0.0.6.6
- Added internal
updatedb,timedatectl,env,split,nl, andtrcommands - Enhanced file indexing, text processing, and system time utilities
- Improved pipeline support for text processing commands
v0.0.6.5
- Added internal
mkfs,fsck,systemctl,journalctl, andmorecommands - Enhanced filesystem and service management utilities
v0.0.6.4
- Added internal
nc,unrar,xz,unxz, anddmesgcommands - Enhanced compression and network utilities
v0.0.6.3
- Added internal
sleepandwaitcommands - Updated help, man pages, and version banner
v0.0.6.2
- Added
shcommand for shell scripts - Enhanced scripting capabilities
v0.0.6.1
- Added bzip2/bunzip2 guides
- Improved compression support
v0.0.6.0
- Added tac, mpstat, cal, lspci, lsusb
- Enhanced system commands
๐ License
GNU General Public License v3.0
๐ Notes
Informational Commands: Some commands provide guidance rather than full implementation:
- bzip2/bunzip2 - External tool guides
- lspci/lsusb - Hardware enumeration guides
- strace/lsof - System inspection guides
- jobs/bg/fg - Job control guides
- at/cron/crontab - Scheduling guides
- tcpdump - Network capture guide
See command help (--help) and man pages for Windows alternatives and recommendations.
๐ Links
- Full command reference: Type
helpin shell - Manual pages: Type
man <command> - Version info: Type
version
Gary's Shell - Bringing Unix power to Windows! ๐