最新消息:

sudo: sorry, you must have a tty to run sudo

linux命令 admin 2874浏览 0评论

使用不同账户,执行执行脚本时候sudo经常会碰到 sudo: sorry, you must have a tty to run sudo这个情况,其实修改一下sudo的配置就好了

vi /etc/sudoers (最好用visudo命令)

注释掉 Default requiretty 一行

#Default requiretty

意思就是sudo默认需要tty终端。注释掉就可以在后台执行了。

转载请注明:爱开源 » sudo: sorry, you must have a tty to run sudo

您必须 登录 才能发表评论!