如果直接运行:
1 |
sudo code |
会报错:
1 2 |
It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument. |
必须指定一个保存用户数据的目录:
1 |
sudo code --user-data-dir="/home/hsm/vscode-root" |
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » Ubuntu Desktop 18.04下以root身份运行Visual Studio Code