|
|
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.' p6 G6 d6 X# E+ [5 y
* @2 v9 [2 b) {7 E9 W, d7 r
6 H6 ~" H# t: e9 W3 w$ Z* h, Z
, N4 Z* u# C+ }- _8 b解决办法:
$ T' p/ X3 H, R0 X8 E5 w/ z p7 T& O. D! A
设置永久别名 (Alias) 1 K* _, b- I" o+ x* \
为了方便使用,可以在 ~/.bashrc 或 ~/.zshrc 中添加别名:7 O7 t" [: J! Q6 l5 F% ]
执行 vim ~/.bashrc。1 u3 z ^7 l' m" A
在末尾添加:
) K% E4 L/ J2 x, O9 V4 c7 ^
& u3 t/ z0 R; L! ^+ ralias code='/usr/bin/code --user-data-dir=~/.vscode-root --no-sandbox'
; ?0 W8 W) A9 S l% j8 p: C- H; D: \3 w. m' s2 V
3 S& t( G0 `0 ~6 o保存并退出,运行 source ~/.bashrc 生效。之后只需输入 sucode 即可启动。 ' d6 x; n6 F' J
Stack Overflow7 _: e6 z. e: l6 O) p- j& m
Stack Overflow
( z, o$ T. A9 L1 w' Z
" f) j5 W# G) R8 g9 A0 N' a- X% X; l: S
再次执行即可使用了。
* }; q# A9 b0 h! {
/ a# y. y* t( M. L" t. H |
|