very simple installation
# Download the Microsoft repository GPG keys
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt update
# Install PowerShell
sudo apt install -y powershell
# Start PowerShell
pwsh
Bash to Powershell command reference
Bash | PowerShell | PowerShell Alias | Note |
Cd | Set-Location | Cd, sl, chdir | Change Directory |
Cp | Copy-Item | Cp, copy cpi | Copy a file |
Find | Get-ChildItem | Find a file | |
Kill | Stop-Process | ||
Ls | Get-ChildItem | Ls, dir | |
Man | Get-Help | Manual for a command | |
Man -k | Get-Command | Find a command | |
Mkdir | New-Item | Make directory | |
Ping | Test-Connection | ||
Ps | Get-Process | ||
pwd | Get-Location | Pwd, gl | Get present working directory |
Rm | Remove-Item | Rm, ri, rmdir, rd, del | Remove directory |
Tail | Get-Content | Display the last 7 lines of a text file | |
Touch | New-Item | Create a new, empty file | |
Wc | Measure-Object | Wc = Word count | |
Whoami | whoami | Display the username | |