Skip to content

Instantly share code, notes, and snippets.

@YasunoriMATSUOKA
Last active September 28, 2023 07:40
Show Gist options
  • Save YasunoriMATSUOKA/a4c031428b3d6ed2fb52c022303dd865 to your computer and use it in GitHub Desktop.
Save YasunoriMATSUOKA/a4c031428b3d6ed2fb52c022303dd865 to your computer and use it in GitHub Desktop.
windows 11 pc setup
# はじめにWindows Update最新化
# 事前に開発者モードを手動で有効化しておく必要あり
# wslを手動でインストール
# インストール可能なディストリビューションを確認
# wsl -l -o
# インストール
# wsl --install -d Ubuntu-22.04
# 再起動
# chocolateyをインストール(wingetでインストールできなかった一部ツールを入れるのに使う) https://chocolatey.org/install
# wingetでインストール可能なものをインストール
# password manager
winget install -e --accept-package-agreements --accept-source-agreements --silent --id AgileBits.1Password
winget install -e --accept-package-agreements --accept-source-agreements --silent --id AgileBits.1Password.CLI
# browser
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Google.Chrome
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Mozilla.Firefox
# office
winget install -e --accept-package-agreements --accept-source-agreements --silent --id TheDocumentFoundation.LibreOffice
# message
winget install -e --accept-package-agreements --accept-source-agreements --silent --id SlackTechnologies.Slack
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Mattermost.MattermostDesktop
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Discord.Discord
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Telegram.TelegramDesktop
# winget install -e --accept-package-agreements --accept-source-agreements --silent --id LINE.LINE
# communication
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Zoom.Zoom
# cloud
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Google.GoogleDrive
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Dropbox.Dropbox
# winget install -e --accept-package-agreements --accept-source-agreements --silent --id Box.Box
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Notion.Notion
winget install -e --accept-package-agreements --accept-source-agreements --silent --id evernote.evernote
# language
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Python.Python.3.12
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Volta.Volta
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Microsoft.OpenJDK.17
winget install -e --accept-package-agreements --accept-source-agreements --silent --id GoLang.Go
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Rustlang.Rustup
# developer
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Amazon.AWSCLI
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Microsoft.AzureCLI
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Google.CloudSDK
# git
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Git.Git
winget install -e --accept-package-agreements --accept-source-agreements --silent --id GitHub.cli
# docker
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Docker.DockerDesktop
# ide
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Microsoft.VisualStudioCode
winget install -e --accept-package-agreements --accept-source-agreements --silent --id JetBrains.IntelliJIDEA.Community
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Google.AndroidStudio
# api
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Stoplight.Studio
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Postman.Postman
# client
# winget install -e --accept-package-agreements --accept-source-agreements --silent --id TeraTermProject.teraterm
winget install -e --accept-package-agreements --accept-source-agreements --silent --id WinSCP.WinSCP
# db
winget install -e --accept-package-agreements --accept-source-agreements --silent --id dbeaver.dbeaver
winget install -e --accept-package-agreements --accept-source-agreements --silent --id PostgreSQL.PostgreSQL
winget install -e --accept-package-agreements --accept-source-agreements --silent --id PostgreSQL.pgAdmin
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Oracle.MySQL
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Oracle.MySQLNotifier
# tools
# https://news.mynavi.jp/techplus/article/c-for-windows-12/
winget install -e --accept-package-agreements --accept-source-agreements --silent --id GnuWin32.Make
winget install -e --accept-package-agreements --accept-source-agreements --silent --id WinMerge.WinMerge
# winget install -e --accept-package-agreements --accept-source-agreements --silent --id WiresharkFoundation.Wireshark
# wallet
winget install -e --accept-package-agreements --accept-source-agreements --silent --id Electrum.Electrum
# streaming
winget install -e --accept-package-agreements --accept-source-agreements --silent --id OBSProject.OBSStudio
winget install -e --accept-package-agreements --accept-source-agreements --silent --id VideoLAN.VLC
# Rasberry Pi Imager
winget install -e --accept-package-agreements --accept-source-agreements --silent --id RaspberryPiFoundation.RaspberryPiImager
# wingetでインストールできなかったものをchocolateyでインストール
choco install -y line box-drive wireshark
# teratermを手動でインストール
# adobe関連手動インストール
# microsoft office関連手動インストール
# Docker Desktopを自動起動設定 & WSL2環境でdockerコマンド使用可能にするため、
# Settings -> Resources -> WSL Integration 内のEnable 的な項目をチェックON & トグルONしてApply & Restart
#!/bin/bash
# WSL2 GUI対応 公式 https://learn.microsoft.com/ja-jp/windows/wsl/tutorials/gui-apps
# Google Chromeの起動で起動した画面が空白になる問題が発生したが以下リンクの方法で解決した
# https://github.com/microsoft/WSL/issues/7915#issuecomment-1480725918
sudo apt install gnome-text-editor -y
sudo apt install gimp -y
sudo apt install nautilus -y
sudo apt install vlc -y
sudo apt install x11-apps -y
cd /tmp
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb
# Google Chromeの起動の問題を解決するために必要だった設定
echo 'export LIBGL_ALWAYS_INDIRECT=1' >> ~/.bashrc
echo 'export DISPLAY=:0' >> ~/.bashrc
exec $SHELL --login
#!/bin/bash
sudo apt update -y && sudo apt upgrade -y
# もし上記でRelease file is not valid yet 的なエラーが出た場合は https://ginpen.com/2021/06/05/apt-update-release-file-is-not-valid-yet/ を参照のこと
# 必要に応じて以下コマンドを実行すると時刻のずれが解消できて問題を(一時的に?)解決できるみたい?
# sudo hwclock --hctosys
# make
sudo apt install -y make
make -v
# Node.js & npm (with volta) https://docs.volta.sh/guide/getting-started
curl https://get.volta.sh | bash
# Python (with pyenv) https://github.com/pyenv/pyenv-installer https://github.com/pyenv/pyenv/tree/master#unixmacos
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
# Java 17
sudo apt install -y openjdk-17-jdk
java --version
# Go 1.21.0
curl -LO https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz
mkdir $HOME/go
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.profile
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile
# Rust 公式: https://www.rust-lang.org/ja/tools/install 参考: https://ja.linux-console.net/?p=3648#gsc.tab=0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# shellを再起動して~/.bashrcへの変更を反映
exec $SHELL --login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment