---
# System prepended metadata

title: Ubuntu PowerShellのインストール　2021-05-10
tags: [PowerShell, Ubuntu]

---

---
lang: ja-jp
breaks: true
---
# Ubuntu PowerShellのインストール　2021-05-10

> Installing PowerShell on Linux
> https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1

## Update the list of packages
```shell=
# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
```

## Install PowerShell
```shell=
$ sudo apt-get install -y powershell
```

## Start PowerShell
```shell=
$ pwsh
```

## Version info
```shell=
> pwsh --version
PowerShell 7.1.3
```

###### tags: `Ubuntu` `PowerShell`
