15
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

WSLのディレクトリにあるhtmlをブラウザで開く

Posted at

意外と分からなかったので、メモ。

terminal
explorer.exe foo.html

explorer.exeを使用すればhtmlファイルを開くことが出来る。

.bashrc
export BROWSER="explorer.exe"

開けなければ、.bashrcに設定する。

.bashrc
alias start="explorer.exe"

楽に開けるようにエイリアスを.bashrcに設定する。

terminal
start foo.html

startコマンドでhtmlを開けるようになる。

##参考
Is there a way to open a file in a browser from WSL?

15
6
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
15
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?