Ubuntu 21.10にpowershellをインストールする方法
環境
OSバージョンの確認
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=21.10 DISTRIB_CODENAME=impish DISTRIB_DESCRIPTION="Ubuntu 21.10"
操作方法
1.snapからpowershellをインストールします
# sudo snap install powershell --classic
powershell 7.2.2 from Microsoft PowerShell? installed
# sudo snap install powershell --classic
powershell 7.2.2 from Microsoft PowerShell? installed
# sudo snap install powershell --classic powershell 7.2.2 from Microsoft PowerShell? installed
2.powershellのインストールを確認します
# powershell
PowerShell 7.2.2
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
PS /root>
# powershell
PowerShell 7.2.2
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
PS /root>
# powershell PowerShell 7.2.2 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. PS /root>
3.ヘルプコマンドの確認
PS /root> Get-Help
TOPIC
PowerShell Help System
SHORT DESCRIPTION
Displays help about PowerShell cmdlets and concepts.
略
PS /root> Get-Help
TOPIC
PowerShell Help System
SHORT DESCRIPTION
Displays help about PowerShell cmdlets and concepts.
略
PS /root> Get-Help TOPIC PowerShell Help System SHORT DESCRIPTION Displays help about PowerShell cmdlets and concepts. 略