Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translated] 20190214 Run Particular Commands Without Sudo Password In #12827

merged 2 commits into from Mar 19, 2019


Copy link

commented Mar 19, 2019


FSSlc added some commits Mar 19, 2019

[Translated] 20190214 Run Particular Commands Without Sudo Password I…

Signed-off-by: Chang Liu <>
在 Linux 中运行特定命令而无需 sudo 密码

我有一台部署在 AWS 上的 Ubuntu 系统,在它的里面有一个脚本,这个脚本的原有目的是以一定间隔(准确来说是每隔 1 分钟)去检查某个特定服务是否正在运行,如果这个服务因为某些原因停止了,就自动重启这个服务。 但问题是我需要 sudo 权限来开启这个服务。正如你所知道的那样,当我们以 sudo 用户运行命令时,我们应该提供密码,但我并不想这么做,实际上我想做的是以 sudo 用户的身份运行这个服务但无需提供密码。假如你曾经经历过这样的情形,那么我知道一个简单的方法来做到这点。今天,在这个简短的指南中,我将教你如何在类 Unix 的操作系统中运行特定命令而无需 sudo 密码。

This comment has been minimized.

Copy link

FSSlc Mar 19, 2019

Author Contributor

这里的 If you’re ever in a situation like this, I know a small work around 这句我可能翻译的不对,请校对的时候多注意下,麻烦了。


wxy approved these changes Mar 19, 2019

@wxy wxy merged commit 6caa3bc into LCTT:master Mar 19, 2019

1 check passed

Travis CI - Pull Request Build Passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.