Linux/PowerShell

From Omnia
Revision as of 21:56, 14 July 2025 by Kenneth (talk | contribs) (Created page with "== Install == <pre> ################################### # Prerequisites # Update the list of packages sudo apt-get update # Install pre-requisite packages. sudo apt-get install -y wget # Get the version of Debian source /etc/os-release # Download the Microsoft repository GPG keys wget -q https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb # Register the Microsoft repository GPG keys sudo dpkg -i packages-microsoft-prod.deb # Delete...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Install

###################################
# Prerequisites

# Update the list of packages
sudo apt-get update

# Install pre-requisite packages.
sudo apt-get install -y wget

# Get the version of Debian
source /etc/os-release

# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb

# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb

# Delete the Microsoft repository GPG keys file
rm packages-microsoft-prod.deb

# Update the list of packages after we added packages.microsoft.com
sudo apt-get update

###################################
# Install PowerShell
sudo apt-get install -y powershell

# Start PowerShell
pwsh

For Ubuntu just change this line:

wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb

ref: https://learn.microsoft.com/en-us/powershell/scripting/install/install-debian?view=powershell-7.5

keywords