0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

windowsにpowershell, openssh, terminalをインストールしてwingetを使ってみる

Last updated at Posted at 2020-05-31

windowsがWSL2, terminalなどリリースしてたりしたので、色々とupdateしてみました。

$ scoop install curl 7z

# powershell 7.0.1
# https://github.com/PowerShell/PowerShell/releases
$ curl -LO https://github.com/PowerShell/PowerShell/releases/download/v7.0.1/PowerShell-7.0.1-win-x64.msi
$ msiexec.exe /package PowerShell-7.0.1-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1

# openssh v8.1.0
# https://github.com/PowerShell/Win32-OpenSSH/releases
$ curl -LO https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip
$ 7z x OpenSSH-Win64.zip
$ cp OpenSSH-Win64/* 'c:\programfiles\OpenSSH\'
or
$ robocopy .\OpenSSH-Win64\ 'c:\Program Files\OpenSSH\'

# terminal 1.0.1
# https://github.com/microsoft/terminal/releases
$ curl -LO https://github.com/microsoft/terminal/releases/download/v1.0.1401.0/Microsoft.WindowsTerminal_1.0.1401.0_8wekyb3d8bbwe.msixbundle
$ Add-AppxPackage ./Microsoft.WindowsTerminal_1.0.1401.0_8wekyb3d8bbwe.msixbundle

robocopyは例えば、sshdというprocessが起動していても上書きするので便利です。

winget

今までは、scoopを愛用してたけど、wingetが公式で提供され始めたので、よさそうだったら使っていきたい。

$ curl -LO https://github.com/microsoft/winget-cli/releases/download/v0.1.4331-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
$ Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle
$ winget

なお、ssh経由では、wingetは使用できない感じでした。アクセス権関連ぽい気がする。これは採用しづらい...。

$ scoop install which
$ which winget
c:\Users\syui\AppData\Local\Microsoft\WindowsApps\winget.EXE

issue : https://github.com/microsoft/winget-cli/issues/256

参照

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?