Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6015

Cannot open VS Code from the terminal (using "code .")

$
0
0

Environment information: VMware 16.2.3, Ubuntu22, VScode -1.78.2

I could use code . to open VS Code in the morning, but I can't do this now, I wonder why.

I tried:

  1. Changing the permission of the directory.

    yindec@yindec-virtual-machine:~/Downloads/eosworks/orchestrator/modules/alioth$ sudo chown -R yindec .[sudo] password for yindec: yindec@yindec-virtual-machine:~/Downloads/eosworks/orchestrator/modules/alioth$ code .mkdir: cannot create directory ‘’: No such file or directoryyindec@yindec-virtual-machine:~/Downloads/eosworks/orchestrator/modules/alioth$ 
  2. Switching user to root.

    yindec@yindec-virtual-machine:~/Downloads/eosworks/orchestrator/modules/alioth$ su - rootPassword: root@yindec-virtual-machine:~# cd /home/yindec/Downloads/eosworks/orchestrator/modules/alioth/root@yindec-virtual-machine:/home/yindec/Downloads/eosworks/orchestrator/modules/alioth# code .mkdir: cannot create directory ‘’: No such file or directoryYou are trying to start Visual Studio Code as a super user which isn't recommended. If this was intended, please add the argument `--no-sandbox` and specify an alternate user data directory using the `--user-data-dir` argument.

    I saw another question, but it is not recommended.

  3. I googled with the error keyword "mkdir: cannot create directory", but almost all the search results is about mkdir.

  4. I could open VS Code by shortcut.


Viewing all articles
Browse latest Browse all 6015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>