Windows Powershell
应用场景:Windows电脑 + Android开发
Windows: cmd --> Powershell
Linux: bash scripts
cmd: bat scripts (xxx.bat)
powershell: cmdlet (xxx.ps1)
alias命令: Get-Alias (不区分大小写)
-
管道符 |
-
Get-Command
-
Update-Help
-
Get-Help Get-Command
和Linux相同的命令:
- pwd
- ls
- clear
- cat
- mkdir
- mv
- cp
- rm
除了Powershell 自身的alias外,我们还可以手动写alias, 比如将Linux上常用的grep命令
编辑Microsoft.PowerShell_profile.ps1 通常位于:C:\Users\你的用户名\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Set-Alias -Name which -Value Get-Command
Set-Alias -Name grep -Value Select-String
一些问题fix: 报错:无法加载文件...因为在此系统上禁止运行脚本

浙公网安备 33010602011771号