DEV Community

Yuta Goto
Yuta Goto

Posted on

WSL2にGoogle Chromeをインストールする

これは .ごっ!のアドベントカレンダー の12日目の記事です。

Microsoftのドキュメントの通りの通りに進めます。

WSL で Linux GUI アプリを実行する | Microsoft Learn

WSL で Linux GUI アプリの実行がどのようにサポートされるかについて説明します。

learn.microsoft.com

前提としてWSL2が有効になっていることとします。

インストール

$ 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 --version
Google Chrome 119.0.6045.159
Enter fullscreen mode Exit fullscreen mode

起動するときは google-chrome コマンドを実行します。

image.png (564.9 kB)

アップデート

一度削除してから、再度 wget で取得してインストールを実行します。

sudo apt --purge remove google-chrome-stable
Enter fullscreen mode Exit fullscreen mode

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs