|
|
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.( v: _ r7 g, a% y \3 d/ ^5 G
. J8 e2 W/ K* @; N' R- `% [6 N. _- i: T) j
9 R8 T% l4 U# y4 u% o( R4 j# M; A
解决办法:
" b! e' E/ k/ d6 M% F! h" v" C
8 g! K1 `0 b. b* u设置永久别名 (Alias) * x X: M3 w3 j4 g" d `
为了方便使用,可以在 ~/.bashrc 或 ~/.zshrc 中添加别名:
8 e% |5 r2 n0 h执行 vim ~/.bashrc。$ z- \( M8 s9 V/ g, k+ ^0 i" L
在末尾添加:
: ?- {( p6 Z, m7 M' Q
9 q+ j; X) E* `alias code='/usr/bin/code --user-data-dir=~/.vscode-root --no-sandbox'4 I8 W3 G2 `- E! J- {' M
% ]' h0 c6 M/ K& P
3 V8 [: A( H. ^8 v: D保存并退出,运行 source ~/.bashrc 生效。之后只需输入 sucode 即可启动。
1 E: j$ |) p2 M KStack Overflow
( T! t( Y4 _6 L* o# `9 i9 ?5 a2 sStack Overflow
3 `6 R7 I- k5 a) |
4 l0 n3 U8 t- R- H7 g: m- w5 q! l# |- `7 r" D
再次执行即可使用了。1 k1 T9 C, ]0 P) Y
# N. o9 c- ~2 e& D5 a' d7 V
|
|