Ubuntu 18.04デスクトップであればPowershellはUbuntuソフトウェアからインストールできるが、Ubuntu 18.04 ServerではAPTの標準リポジトリにはないようだ。
$ apt search powershell
ソート中... 完了
全文検索... 完了
python-dcos/bionic 0.2.0-2 all
Datacenter Operating System (DCOS) CLI - Python 2.7
python3-dcos/bionic 0.2.0-2 all
DCOS Common Modules - Python 3.x
python3-winrm/bionic 0.3.0-1ubuntu1 all
Python 3 library for Windows Remote Management
公式サイト を見るとUbuntu 18.04用debパッケージがあったので、それをダウンロードしてインストールする。
$ wget https://github.com/PowerShell/PowerShell/releases/download/v6.1.2/powershell_6.1.2-1.ubuntu.18.04_amd64.deb
aptコマンドでインストールする。ファイル指定時はカレントディレクトリを指定する必要があることに注意。
$ sudo apt install ./powershell_6.1.2-1.ubuntu.18.04_amd64.deb
実行ファイルは/opt/microsoft/powershell/6/pwshにインストールされる。なぜか/usr/bin以下には何も作成されないので、シンボリックリンクでも作っておく。
$ sudo ln -s /opt/microsoft/powershell/6/pwsh /usr/local/bin/powershell
$ powershell
PowerShell 6.1.2
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /home/ryecroft>
関連記事
まだコメントはありません
この記事へのコメント