LoginSignup
0
0

Ubuntu22.04 セットアップ(Docker, fish, vscode, Proxy)

Last updated at Posted at 2023-05-14

目的

古いPCをUbuntuPCにしたときの個人的なメモ。
このPCはweb系を触るために使う予定。
追記予定

やったこと

ubuntuのインストール

USBブートでインストールした。イメージダウンロードしてきてRufus?で作った。
BIOSでbootの優先順位を変えるの忘れずに。
言語は日本語。キーボードレイアウトは好み的にJIS。
ユーザー名とか設定したら最初に出てくるソフトウェアアップデートを実行。
そんでreboot。

bash -> fish

補完機能やプラグインが優秀なfishを使うようにします。
こちらの記事を参考にしました。

ubuntuにはcurlコマンドが標準搭載されいていないため、インストールしてない人は

sudo apt install -y curl

でインストールしましょう。
あとは参考記事のように

Terminal
sudo apt install -y fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
which fish
chsh #whichで出てきたパスを入力

プラグインを使用する場合、標準フォントだと99.99%文字化けする。
そこで推奨されているpowerline系のフォントをインストールする。

Terminal
git clone https://github.com/powerline/fonts.git
./fonts/install.sh
rm -rf ./fonts

ここまで実行したらPCを再起動。
Terminalでfishが実行されているのが確認できたら、Terminal上で右クリックして、
Preferences->Profiles->text->Custo fontからPowerline系のフォントを選択しましょう。
ここまでできたらfisher使ってTerminalのテーマ変えたり、便利なプラグインいれていきましょう。

vscodeのインストール

使い慣れたvscodeをインストールする。
公式を参考にして、.debファイルからインストールする方法でやった。

Terminal
sudo apt install ./Downloads/code_1.78.2-1683731010_amd64.deb

Terminalでcodeコマンドを実行してvscodeが実行できたら成功。

Dockerのインストール

インストールスクリプトを使ってインストールします。

Terminal
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo docker run hello-world

hello-worldが表示されたら成功。
でも、このままだとdockerコマンドを実行するのにsudoが必須になるので

Terminal
sudo groupadd docker
sudo usermod -aG docker $USER

ここまで実行したらPC再起動してsudoをつけずに実行してみる

Terminal
docker run hello-world

GG

Proxy(必要に応じて)

GUIあるならネットワーク設定でやる。
aptのProxy設定

/etc/apt/apt.conf
Acquire::http::Proxy "http://192.168.1.1:433"
Acquire::https::Proxy "http://192.168.1.1:433"

日本語入力

この記事通りにやればいい。

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