PowerShell as cmd.exe or Bash

By Xah Lee. Date: . Last updated: .

PowerShell has many aliases that emulates cmd.exe or bash.

If you are familiar with cmd.exe or bash, you can start using PowerShell as replacement.

PowerShell command names are not case sensitive


full namealiascmd.exebashPurpose
Get-Helphelp, manhelpmanHelp on commands
Clear-Hostcls, clearclsclearClear the screen
Get-Commandgcmwherewhichfind command path

Path Manipulation

Path Manipulation
full namealiascmd.exebashPurpose
Set-Locationsl, cd, chdircd, chdircdChange dir
Get-Locationgl, pwdecho %cd%pwdShow current dir
Get-ChildItemgci, dir, lsdirlsList current dir content
Push-LocationpushdpushdpushdSave current path to stack
Pop-LocationpopdpopdpopdSwitch to last pushed dir

File Manipulation

File Manipulation
full namealiascmd.exebashPurpose
Copy-Itemcpi, copy, cpcopycpCopy file or dir
Remove-Itemri, del, erase, rmdir, rd, rmdel, erase, rmdir, rdrm, rmdirDelete file or dir
Rename-Itemrni, renren, renamemvRename file or dir
Move-Itemmi, move, mvmovemvMove file or dir

Text Processing

Text Processing
full namealiascmd.exebashPurpose
Get-Contentgc, type, cattypecatGet file content
Select-Stringfind, findstrgrepShow texts matching a pattern

Environment Variable

env var Manipulation
full namealiascmd.exebashPurpose
Write-Outputecho, writeechoechoPrint to standard output
Set-Variablesv, setsetsetSet/create variable

Process Management

Process Management
full namealiascmd.exebashPurpose
Get-Processgps, pstlist, tasklistpsList running processes
Stop-Processspps, killkill, taskkillkillStop a running process

For more complex unix commands, see: PowerShell vs Bash

If you have a question, put $5 at patreon and message me.


xah powershell logo
  1. Install, Start, Exit
  2. Help Command
  3. as cmd.exe, bash
  4. list Alias
  5. Piping
  6. Env Vars
  7. Automatic Variables
  8. Write Script
  9. PowerShell vs Bash