0
2

More than 3 years have passed since last update.

Windows Terminalのプロファイル設定

Last updated at Posted at 2021-05-12

はじめに

やりたいこと

  • PowerShell、Windows Terminalをインストールする
  • Git・Python用のプロファイルを設定する

説明

そもそも、ターミナル(Terminal) と シェル(Shell) とは?

  • シェル
    • ユーザがOSを操作するためのインターフェース
    • cf) bash, zsh, powershell
  • ターミナル

    • 標準出力を文字として表示したり、キーボード入力を取得したりするプログラム
    • cf) GNOME Terminal, xterm
  • 主に、ターミナルを介して、シェルを操作する

  • 本記事では、Windows Terminal(ターミナル) を介して、PowerShell、Git Bash(シェル) を操作する。

手順

PowerShell をインストールする

  1. Microsoft Store 経由で PowerShell をインストールする
    • ダウンロードサイト PowerShell を入手 - Microsoft Store
    • デフォルトでインストールされている "Windows PowerShell" は開発が終わっているため、新しく開発が行われている "PowerShell Core" を利用したほうが良い

Windows Terminalをインストールする

  1. Microsoft Store 経由で Windows Terminal をインストールする

Gitのインストール

Pythonのインストール

Windows Terminal のプロファイルを設定

  1. Windows Terminal を起動
  2. 上部の "V" のようなマークをクリック。
  3. 左の一番下にある "JSONファイルを開く" をクリック
  4. "settings.json" を編集
## ~~~ 省略 ~~~
"profiles": 
    {
        # デフォルトの設定
        "defaults": 
        {
            "acrylicOpacity": 0.9,           # 透過率
            "colorScheme": "One Half Dark",  # カラーテーマ
            "fontFace": "Cascadia Code",     # フォント
            "fontSize": 10,                  # フォントサイズ
            "fontWeight": "normal",          # フォントスタイル
            "padding": "0, 0, 0, 0",         # 余白の指定
            "useAcrylic": true               # 透過を行う
        },
        "list": 
        [
            ## ~~~ 省略 ~~~
            {
                ## Git Bash Profile
                "commandline": "C:\\Program Files\\Git\\bin\\bash.exe",
                "guid": "{ea627c79-2732-4aa7-84be-e6787190da28}",
                "hidden": false,
                "icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
                "name": "Git Bash"
            },
            {
                ## Interactive mode Python Profile
                "commandline" : "C:\\Program Files\\Python39\\python.exe",
                "guid" : "{1850e97f-16dc-4281-9ea9-0100c4e852c5}",
                "icon" : "C:\\Program Files\\Python39\\Lib\\test\\imghdrdata\\python.png",
                "name" : "Python",
                "startingDirectory" : "%USERPROFILE%"
            }
        ]
    },
## ~~~ 省略 ~~~

終わり

本記事は終了です。

References

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