差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
linux:powershell [2020/05/15 11:18] – ともやん | linux:powershell [2021/07/06 15:06] – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ~~CLOSETOC~~ | ||
====== PowerShell(Linux) ====== | ====== PowerShell(Linux) ====== | ||
[[windows: | [[windows: | ||
行 5: | 行 6: | ||
ソースコード: | ソースコード: | ||
\\ | \\ | ||
- | {{:linux: | + | {{linux: |
===== インストール ===== | ===== インストール ===== | ||
行 11: | 行 12: | ||
[[https:// | [[https:// | ||
[[https:// | [[https:// | ||
- | [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.1|Releases · PowerShell/PowerShell - Release Candidate 1]]\\ | + | [[https://aka.ms/ |
- | [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.2|Releases · PowerShell/PowerShell - Release Candidate 2]]\\ | + | |
- | \\ | + | ==== Fedora - dnf ==== |
- | ==== Fedora 31 ==== | + | [[https:// |
+ | <WRAP prewrap 100% # | ||
+ | < | ||
+ | # Register the Microsoft signature key | ||
+ | sudo rpm --import | ||
+ | |||
+ | # Register the Microsoft RedHat repository | ||
+ | curl https://packages.microsoft.com/ | ||
+ | |||
+ | # Update the list of products | ||
+ | sudo dnf check-update | ||
+ | |||
+ | # Install a system component | ||
+ | sudo dnf install compat-openssl10 | ||
+ | |||
+ | # Install | ||
+ | sudo dnf install | ||
+ | |||
+ | # Start PowerShell | ||
+ | pwsh | ||
+ | </ | ||
+ | </ | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
< | < | ||
- | $ sudo dnf install | + | $ sudo rpm --import |
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ cat / | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
+ | Fedora release 34 (Thirty Four) | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | packages-microsoft-com-prod ([[https:// | ||
+ | < | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ curl https:// | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
+ | % Total % Received % Xferd Average Speed | ||
+ | | ||
+ | 100 | ||
+ | [packages-microsoft-com-prod] | ||
+ | name=packages-microsoft-com-prod | ||
+ | baseurl=https:// | ||
+ | enabled=1 | ||
+ | gpgcheck=1 | ||
+ | gpgkey=https:// | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ sudo dnf install powershell | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% result_long> | ||
+ | <code powershell> | ||
+ | メタデータの期限切れの最終確認: | ||
+ | 依存関係が解決しました。 | ||
+ | =============================================================================================== | ||
+ | | ||
+ | =============================================================================================== | ||
+ | インストール: | ||
+ | | ||
+ | |||
+ | トランザクションの概要 | ||
+ | =============================================================================================== | ||
+ | インストール | ||
+ | |||
+ | 合計サイズ: | ||
+ | インストール後のサイズ: | ||
+ | これでよろしいですか? | ||
+ | パッケージのダウンロード: | ||
+ | [SKIPPED] | ||
+ | ----------------------------------------------------------------------------------------------- | ||
+ | 合計 | ||
+ | トランザクションの確認を実行中 | ||
+ | トランザクションの確認に成功しました。 | ||
+ | トランザクションのテストを実行中 | ||
+ | トランザクションのテストに成功しました。 | ||
+ | トランザクションを実行中 | ||
+ | 準備 | ||
+ | インストール中 | ||
+ | scriptletの実行中: | ||
+ | 検証 | ||
+ | |||
+ | インストール済み: | ||
+ | powershell-7.1.3-1.rhel.7.x86_64 | ||
+ | |||
+ | 完了しました! | ||
</ | </ | ||
</ | </ | ||
行 38: | 行 136: | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
<code powershell> | <code powershell> | ||
- | PS > Get-Host | + | $ Get-Host |
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% result> | ||
+ | <code powershell> | ||
Name : ConsoleHost | Name : ConsoleHost | ||
- | Version | + | Version |
- | InstanceId | + | InstanceId |
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface | UI : System.Management.Automation.Internal.Host.InternalHostUserInterface | ||
CurrentCulture | CurrentCulture | ||
行 50: | 行 151: | ||
IsRunspacePushed : False | IsRunspacePushed : False | ||
Runspace | Runspace | ||
+ | </ | ||
+ | </ | ||
- | + | <WRAP prewrap 100%> | |
- | PS > Get-Host | Select-Object Version | + | <code powershell> |
+ | $ Get-Host | Select-Object Version | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
Version | Version | ||
------- | ------- | ||
7.0.0-rc.2 | 7.0.0-rc.2 | ||
+ | </ | ||
+ | </ | ||
- | PS > $PSVersiontable | + | <WRAP prewrap 100%> |
+ | <code powershell> | ||
+ | $ $PSVersiontable | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
Name Value | Name Value | ||
---- ----- | ---- ----- |