copied from: https://ss64.com
multi-line command:
\ backslash^ caret` backtickwindows commands are always case insensitive
| bash | cmd | pwsh |
|---|---|---|
| pwd | CD | Get-Location |
| cd | CD | Set-Location |
| ls | DIR | Get-ChildItem |
| echo | ECHO | Write-Output |
| $PATH | %PATH% | $env:PATH |
| cat | TYPE | Get-Content |
| export | SET | Set-Variable |
| grep | FINDSTR | Select-String |
| which | WHERE | |
| alias | Set-Alias | |
| tee | Tee-Object | |
| &> ███ | > ███ 2>&1 | *> ███ |
| /dev/null | NUL | $null |
| ping | PING | Test-Connection |
| cp | COPY | Copy-Item |
| mv | MOVE | Move-Item |
| rm | DEL | Remove-Item |
| mkdir | MD | New-Item -ItemType Directory |
| ln -s | MKLINK file MKLINK /D dir |
New-Item -ItemType SymbolicLink |
| ln | MKLINK /H file MKLINK /J dir |
New-Item -ItemType HardLink New-Item -ItemType Junction |
| pushd | PUSHD | Push-Location |
| popd | POPD | Pop-Location |
| ${0%/*} | %~dp0 | $PSScriptRoot |
| clear | CLS | Clear-Host |
get current time:
date '+%Y-%m-%d %A %H:%M %Z'DATE /T && TIME /T && TZUTIL /GGet-Date -format "yyyy-MM-dd dddd HH:mm zzz"