Install powershell on debian 10

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

BashPowerShellPowerShell AliasNote
CdSet-LocationCd, sl, chdirChange Directory
CpCopy-ItemCp, copy cpiCopy a file
FindGet-ChildItemFind a file
KillStop-Process
LsGet-ChildItemLs, dir
ManGet-HelpManual for a command
Man -kGet-CommandFind a command
MkdirNew-ItemMake directory
PingTest-Connection
PsGet-Process
pwdGet-LocationPwd, glGet present working directory
RmRemove-ItemRm, ri, rmdir, rd, delRemove directory
TailGet-ContentDisplay the last 7 lines of a text file
TouchNew-ItemCreate a new, empty file
WcMeasure-ObjectWc = Word count
WhoamiwhoamiDisplay the username

Leave a Reply

Your email address will not be published. Required fields are marked *