Score:0

VS Code doesn't open from command line as root

ph flag

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?

Nicolas Formichella avatar
cn flag
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)
Score:0
de flag

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

code  --userdata-dir /your/path
drummeress avatar
ph flag
still doesn't launch the vscode
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.