0

I'm using Ubuntu 18.04.5 LTS (Bionic Beaver). I'm trying to run VS Code using these commands:

>> sudo -s
# mkdir ../user-data-dir
# cd <project_path>
<project_path># code . --userdata-dir ../user-data-dir
<project_path>#

I used to launch VS Code using these commands as root before, but now it is not working. I get no errors in the command line.

code . does open VS Code if I'm not running as root.

Help please?

BeastOfCaerbannog
  • 10,395
  • 9
  • 41
  • 69
  • 1
    Does this answer your question? [How to run Visual Studio Code as root](https://askubuntu.com/questions/803343/how-to-run-visual-studio-code-as-root) – Nicolas Formichella Jun 15 '21 at 08:58

1 Answers1

0

You have an extra . in your command. Try this:

code  --userdata-dir /your/path
Karlom
  • 536
  • 3
  • 6
  • 16