7
7

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 1 year has passed since last update.

【Winget】Windows Trminalから使えるWingetで簡単に環境を構築してみた

Last updated at Posted at 2021-11-01

wingetとは

Windows11で標準搭載となった、Windows Trminalにて使用できる、コマンドラインパッケージマネージャー。
Linuxで言うところの、aptやyamが該当するコマンドラインからアプリケーションをインストールする手段。

使用方法

Windows Terminalで"winget"を実行。下記実行した様子。

❯ winget
Windows パッケージ マネージャー v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.

WinGet コマンド ライン ユーティリティを使用すると、コマンド ラインからアプリケーションやその他のパッケージをインストールできます。

使用状況: winget [<コマンド>] [<オプション>]

使用できるコマンドは次のとおりです:
  install    指定されたパッケージをインストール
  show       パッケージに関する情報を表示します
  source     パッケージのソースの管理
  search     アプリの基本情報を見つけて表示
  list       インストール済みパッケージを表示する
  upgrade    利用可能なアップグレードの表示と実行
  uninstall  指定されたパッケージをアンインストール
  hash       インストーラー ファイルをハッシュするヘルパー
  validate   マニフェスト ファイルを検証
  settings   設定を開くか、管理者設定を設定する
  features   試験的な機能の状態を表示
  export     インストールされているパッケージのリストをエクスポート
  import     ファイル中のすべてのパッケージをインストール

特定のコマンドの詳細については、そのコマンドにヘルプ引数を渡します。 [-?]

次のオプションを使用できます。
  -v,--version  ツールのバージョンを表示
  --info        ツールの一般情報を表示

詳細については、次を参照してください。 https://aka.ms/winget-command-help

よく使うソフトのインストールコマンド(忘備録)

# 原則
>winget insatall {ソフトウェア名称}
ただし、似たようなソフトウェアがある場合、
>winget install {ソフトウェアID}

# 必須ソフトウェア
> winget install vscode
> winget install Microsoft.PowerToys
> winget install 7zip.7zip
> winget install Google.Chrome
> winget install winscp
> winget install Git.Git
> winget install python

# 専門ツール
> winget install stellarium
> winget install QGIS
> winget insatall Inkscape.Inkscape

インストールしたソフトのアップデート

# アップデートが可能なソフト一覧を出力
> winget upgrade

# すべてのソフトウェアをアップデート
> winget upgrade --all

終わりに

Linuxでは当たり前となっている、コマンドラインパッケージマネージャーを使用できるのはうれしいですよね。
また、Windows11からは標準搭載となるみたいなので、これから使用頻度が増えると思い、メモを残しました。

参考

7
7
1

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
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?