Create a file inside /etc/sudoers.d/ You can use this command
sudo vim /etc/sudoers.d/privacy
Now paste this line into the file ‘privacy
‘.
Defaults lecture = always
Now close Terminal/console, Reopen it and try to do something with sudo.
标签:图片 dir and bsp option console prompt default nbsp
如图所示,执行sudo命令,提示语(有中文和英文两个版本):
上面的提示内容是sudo软件原生的内容。
使用下面的方法,有的时候是可行的。sudo -p ‘提示语‘ 命令
如果要修改sudo软件原生的提示内容,只有重新编译软件。
屏蔽提示的方法:https://superuser.com/questions/500119/keeping-the-fancy-sudo-warning-forever
Create a file inside /etc/sudoers.d/ You can use this command
sudo vim /etc/sudoers.d/privacy
Now paste this line into the file ‘privacy
‘.
Defaults lecture = always
Now close Terminal/console, Reopen it and try to do something with sudo.
标签:图片 dir and bsp option console prompt default nbsp
原文地址:https://www.cnblogs.com/shengulong/p/9231383.html
lecture
tonever
? – Richard de Wit Jun 14 ‘17 at 10:16always
never
once
sudoers man – Chris Nov 28 ‘17