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

備忘録 Ubuntu からcode .でVScodeが開けなくなった

Last updated at Posted at 2022-10-19

Ubuntu からcode .でVScodeを開こうとしたが、
/mnt/c/Users/ユーザー名/AppData/Local/Programs/Microsoft VS Code/bin/code: 46: cannot create /tmp/remote-wsl-loc.txt: Permission denied
/mnt/c/Users/ユーザー名/AppData/Local/Programs/Microsoft VS Code/bin/code: 52: /mnt/c/Users/ユーザー名/.vscode/extensions/ms-vscode-remote.remote-wsl-0.66.3/scripts/wslCode.sh: not found
というエラーが出て開けなくなった。

【解決方法】
エラー通り/tmp/remote-wsl-loc.txtファイルの権限がrootユーザーに変更されていたため、権限を一般ユーザーに変更した。

1.Ubuntuでcd /tmpを実行しtmpディレクトリまで移動。
2.sudo chown ユーザー名:ユーザー名 -R remote-wsl-loc.txt
権限がユーザーに変更できたので、再度code .で実行すると起動できた。

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