vscode . open project

·162 字 · 约 1 分钟#linux#vscode

You are trying to start Visual Studio Code as a super user which isn’t recommended. If this was i…

在 centos7 中通过 wget 安装 vscode (tar.gz 格式) 后,执行 /bin/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.
您正试图以超级用户身份启动 Visual Studio 代码,这是不推荐的。如果是这样,请添加参数 “–no sandbox”,并使用 “–user data dir” 参数指定备用用户数据目录。

解决方法:
方法一:修改~/.bashrc

vi ~/.bashrc

添加一行

whereis code 
# code: /usr/bin/code /usr/share/code
alias code='/usr/share/code/code . --no-sandbox --unity-launch'
source ~/.bashrc

本文由 note.batype.com 导入。

相关文章

  • Acme 证书

    acme.sh 是一个纯 Unix Shell 脚本,用于从证书颁发机构(如 Let’s Encrypt)自动获得 SSL/TLS 证书。它实现了 ACME 协议并支持多种 DNS 服务商解析,包括阿

  • MySQL linux install

    在线下载 mysql 安装包

  • CentOS 上安装 Nginx

    要在 CentOS 上安装 Nginx,您可以按照以下步骤进行操作: