我想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