個人用セットアップメモ。
最終更新: 2024/02/06
WSLのセットアップ
ツール
neofetch
ディストリビューション情報を表示する。
direnv
Git
WSL で Git の使用を開始する | Microsoft Docs]
参考:
Ubuntu 22.04 LTS でGit Credential Managerを使う – 発声練習
bat
catコマンドをモダン化したモノ。ページャーを含むのでlessの代替でもある。Ubuntuにインストールする場合にはReadmeの手順でいくつかのインストール方法から選択する必要がある。(普通にaptでインストールするとbatacatと言うコマンド名になってしまう。)
exa
モダナイズされたls
Ubuntuのaptでインストールすると –git オプションが使えないので、使いたいときにはcargo(Rustのパッケージマネージャー)でインストールする。
rg(ripgrep)
grepの改良
jq
jsonのデータ処理
Go言語
Go Wiki: Ubuntu – The Go Programming Language(インストール)
nodejs
Ubuntu 22.04 に NVM (Node Version Manager) をインストールして使用する方法
最近は複数言語に対応するasdfと言うバージョンマネージャーを使うのが良いらしい。
.NET SDK
Ubuntu に .NET をインストールする – .NET | Microsoft Docs
Azure CLI
Azure CLI を Linux にインストールする | Microsoft Docs
Docker
Docker for Windows Desktopをインストールしておく。

上の設定を確認する。
WSL2上のLinuxのコンソール(Ubuntu)でパッケージを追加する。
$ sudo apt install docker.io -y
一般ユーザでdockerを利用可能にする。
$ sudo usermod -aG docker $USER
$ newgrp docker
Hello Worldで確認
$ docker pull hello-world
$ docker run hello-world
参考
Home Brew
The Missing Package Manager for macOS (or Linux) — Homebrew
別に入れなくても良い。
buf
Home Brewでインストールする。
以下の方が良い。
go install github.com/bufbuild/buf/cmd/buf@latest

ko
Home Brewでインストール。
以下の方が良い。
go install github.com/google/ko@latest
enhancd

cdを良い具合に省力してくれるツール。
systemd
mozcでの日本語入力

各種ダイアログの表示方法

snap


GoLand
sudo snap install goland --classic
FireFox
sudo snap install firefox
chromium
sudo snap install chromium
fish shell



git補間のインストール
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/git.fish > ~/.config/fish/completions/git.fish
github cliの補間のインストール
gh completion -s fish > ~/.config/fish/completions/gh.fish

go installのアップデート

参考
oh-my-posh
LinuxのBashにOh My Poshを導入する #Linux – Qiita
その他







Windows側設定
- Windows Terminal
- Linuxの開始ディレクトリの設定を次のようにする「\wsl$\<ディストリビューション名>\home\ishisaka」