小编dav*_*vid的帖子

以 sudo 为 root 执行命令

我想gedit file.txt使用 sudo 以 root身份执行命令,例如:

sudo gedit file.txt
Run Code Online (Sandbox Code Playgroud)

应该问我 root 密码。

目前,输入sudo gedit file.txt结果为:

[sudo] password for currently_logged_in_user:
Run Code Online (Sandbox Code Playgroud)

输入密码后,结果如下:

currently_logged_in_user is not in the sudoers file.
This incident will be reported.
Run Code Online (Sandbox Code Playgroud)

所以我不得不su root gedit file.txt改用,这很不方便。

sudo

1
推荐指数
1
解决办法
370
查看次数

标签 统计

sudo ×1