Equivalent Windows and UNIX Commands

Cross-reference of common commands between *NIX (Linux/macOS) shells and Windows cmd.exe. Useful when moving between platforms during an engagement or writing cross-platform runbooks.

Command equivalencies

*NIXWindows
cattype
dignslookup
grepfindstr / Select-String (PowerShell)
ifconfig / ip addripconfig
lsdir
moremore
netstatnetstat
pingping
shutdownshutdown
sleeptimeout
sudorunas
tcpdumpwindump / pktmon
traceroutetracert
wgetwget (PowerShell alias → Invoke-WebRequest on some builds)
hostnamehostname
whoamiwhoami

Shell operators that translate

Operation*NIXWindows
Redirect stdout to file>>
Pipe between commands||
Run sequentially, stop on failure&&&& (cmd, modern)
Run sequentially regardless;&

Gotchas

  • findfind: Windows find is a string-search filter (like a weak grep), not the UNIX file-search tool. The UNIX-style tool on Windows is dir /s /b or PowerShell Get-ChildItem -Recurse. See findstr for the real grep analogue.
  • Aliases in PowerShell: ls, cat, sleep, wget, and curl are aliases to PowerShell cmdlets with different flags — scripts written for cmd.exe may silently change behavior under PowerShell.
  • Case sensitivity: Windows paths are case-insensitive; *NIX paths are not.

Sources

Related: findstr, net-windows-command, windows-reconnaissance-commands, linux-reconnaissance-commands, powershell-run-commands