Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LinuxDevOpsGirl/7080bc168ea7d1518e39c776c2f386ba to your computer and use it in GitHub Desktop.
Save LinuxDevOpsGirl/7080bc168ea7d1518e39c776c2f386ba to your computer and use it in GitHub Desktop.
PowerShell
PowerShell
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.
Installation via Package Repository - Ubuntu 18.04:
PowerShell Core for Linux is published to package repositories for easy installation and updates.The preferred method is as follows:
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
Get-ChildItem /
dir
#Installation via Direct Download - Ubuntu 18.04:
sudo wget https://github.com/PowerShell/PowerShell/releases/download/v6.2.3/powershell_6.2.3-1.ubuntu.18.04_amd64.deb
sudo dpkg -i powershell_6.2.3-1.ubuntu.18.04_amd64.deb
sudo apt-get install -f
#Uninstallation - Ubuntu 18.04:
sudo apt-get remove powershell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment