|
1 | 1 | --- |
2 | 2 | description: This article describe how to use aliases in PowerShell. |
3 | | -ms.date: 06/10/2024 |
| 3 | +ms.date: 07/23/2024 |
4 | 4 | title: Using aliases |
5 | 5 | --- |
6 | 6 | # Using aliases |
@@ -68,25 +68,25 @@ Set-Alias -Name cmpo -Value Compare-Object |
68 | 68 |
|
69 | 69 | ## Compatibility aliases in Windows |
70 | 70 |
|
71 | | -PowerShell has several aliases that allow **UNIX** and **cmd.exe** users to use familiar commands in |
| 71 | +PowerShell has several aliases that allow **UNIX** and `cmd.exe` users to use familiar commands in |
72 | 72 | Windows. The following table show common commands, the related PowerShell cmdlet, and the PowerShell |
73 | 73 | alias: |
74 | 74 |
|
75 | | -| cmd.exe command | UNIX command | PowerShell cmdlet | PowerShell alias | |
76 | | -| ------------------------------------- | ------------ | ----------------- | ----------------------------------------- | |
77 | | -| **cd**, **chdir** | **cd** | `Set-Location` | `sl`, `cd`, `chdir` | |
78 | | -| **cls** | **clear** | `Clear-Host` | `cls` `clear` | |
79 | | -| **copy** | **cp** | `Copy-Item` | `cpi`, `cp`, `copy` | |
80 | | -| **del**, **erase**, **rd**, **rmdir** | **rm** | `Remove-Item` | `ri`, `del`, `erase`, `rd`, `rm`, `rmdir` | |
81 | | -| **dir** | **ls** | `Get-ChildItem` | `gci`, `dir`, `ls` | |
82 | | -| **echo** | **echo** | `Write-Output` | `write` `echo` | |
83 | | -| **md** | **mkdir** | `New-Item` | `ni` | |
84 | | -| **move** | **mv** | `Move-Item` | `mi`, `move`, `mi` | |
85 | | -| **popd** | **popd** | `Pop-Location` | `popd` | |
86 | | -| | **pwd** | `Get-Location` | `gl`, `pwd` | |
87 | | -| **pushd** | **pushd** | `Push-Location` | `pushd` | |
88 | | -| **ren** | **mv** | `Rename-Item` | `rni`, `ren` | |
89 | | -| **type** | **cat** | `Get-Content` | `gc`, `cat`, `type` | |
| 75 | +| Windows Command Shell | UNIX command | PowerShell cmdlet | PowerShell alias | |
| 76 | +| ----------------------------- | ------------ | ----------------- | ----------------------------------------- | |
| 77 | +| `cd`, `chdir` | `cd` | `Set-Location` | `sl`, `cd`, `chdir` | |
| 78 | +| `cls` | `clear` | `Clear-Host` | `cls` `clear` | |
| 79 | +| `copy` | `cp` | `Copy-Item` | `cpi`, `cp`, `copy` | |
| 80 | +| `del`, `erase`, `rd`, `rmdir` | `rm` | `Remove-Item` | `ri`, `del`, `erase`, `rd`, `rm`, `rmdir` | |
| 81 | +| `dir` | `ls` | `Get-ChildItem` | `gci`, `dir`, `ls` | |
| 82 | +| `echo` | `echo` | `Write-Output` | `write` `echo` | |
| 83 | +| `md` | `mkdir` | `New-Item` | `ni` | |
| 84 | +| `move` | `mv` | `Move-Item` | `mi`, `move`, `mi` | |
| 85 | +| `popd` | `popd` | `Pop-Location` | `popd` | |
| 86 | +| | `pwd` | `Get-Location` | `gl`, `pwd` | |
| 87 | +| `pushd` | `pushd` | `Push-Location` | `pushd` | |
| 88 | +| `ren` | `mv` | `Rename-Item` | `rni`, `ren` | |
| 89 | +| `type` | `cat` | `Get-Content` | `gc`, `cat`, `type` | |
90 | 90 |
|
91 | 91 | > [!NOTE] |
92 | 92 | > The aliases in this table are Windows-specific. Some aliases aren't available on other platforms. |
|
0 commit comments