As I understand the sudo command (and maybe I'm wrong) it's a way to run what you need to run as root, and then get out as quickly as possible. But I read in the forums for TurnKey Linux that they believe you do not need sudo on a server machine. This seems wrong to me, since you're never supposed to stay logged in as root; what am I missing here?

  • 1
    Jeremy addressed this on this askubuntu post. Quote: With this setup [server], sudo is generally not required. For general admin just use root (and so no need for sudo). If you want additional users you probably don't want them having admin (sudo) privileges anyway. [...] If you want sudo then just install it. Nov 19, 2015 at 15:27

1 Answer 1


When people say "Don't login as root", the primary target of this (as I've seen it) is against people that use root as if it were a normal user account. For example logging into X and running your DE/WM as root along with every app you run. This is bad, don't login as root!

In the absence of sudo the way to elevate to superuser privileges is with su. I would also argue for a server with multiple users that su is a better choice than sudo for unrestricted root access. This is because su requires the root password, wheras sudo makes use of the user's password. This means if users have sudo access and their account password is compromised then the attacker now also can run commands as root. This is a bad thing.

For a server environment sudo only has a place (in my opinion) if you need to grant access to specific superuser commands to users that you do not trust with root access (e.g. not unrestricted access). I'd argue on a production server users like this don't exist and root access should be restricted to the administrators.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .