赞
踩
[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.
不推荐以root账户启动vscode,需要添加参数
[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 #再次启动
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。