执行sudo命令时的提示语,如何修改?

如图所示,执行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.

 

Can I also disable the message by setting lecture to never? – Richard de Wit Jun 14 '17 at 10:16
Yes, the options for lecture are: always never once sudoers man – Chris Nov 28 '17
 
参考:
 
https://www.ostechnix.com/change-sudo-prompt-linux-unix/
https://bbs.archlinux.org/viewtopic.php?id=39499
http://www.webjx.com/server/linux-18515.html

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值