2
1

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 1 year has passed since last update.

windowsでWSL2のフォルダを開く

Posted at

はじめに

WSL2を使っていて「Windows側でファイル開きたいな」って時があったので、その方法についてです。なお、Windows11を使用しています。

問題

一般的に使われているであろうコマンドをたたいたら、失敗してしまいました。

$ xdg-open

"command not found"とのことで、画面の指示通り"sudo apt install xdg-utils"を実行したものの、"You don't seem to have any mimeinfo.cache files."という警告文が出てしまいます。

解決方法

下記のコマンドで成功しました。

$ explorer.exe .

おわりに

WSLだと問題なく実行できるようですが、WSL2だとうまくいかないのでしょうか。
明確な理由は謎ですが、上記のコマンドで一発で開けました。

参考

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?