Visual Studio Code报错:You are trying to start Visual Studio Code as a super user which isn‘t......
VsCode启动报错:You 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
文章共325字 · 阅读需要大约2分钟
一键AI生成摘要,助你高效阅读
问答
·
01、具体报错
[root@localhost ~]# code
You 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.
02、报错原因
不推荐以root账户启动vscode,需要添加参数
03、解决方案
[root@localhost ~]# pwd
/root #在root目录下
[root@localhost ~]# vim .bashrc
添加以下配置
alias code='/usr/share/code/code . --no-sandbox --unity-launch'
配置生效
[root@localhost ~]# source ~/.bashrc
[root@localhost ~]# source ~/.bashrc #再次启动
更多推荐
已为社区贡献1条内容
所有评论(0)