• Hi Guest!
    You can help ensure that British Car Forum (BCF) continues to provide a great place to engage in the British car hobby! If you find BCF a beneficial community, please consider supporting our efforts with a subscription.

    There are some perks with a member upgrade!
    **Upgrade Now**
    (PS: Subscribers don't see this gawd-aweful banner
Tips
Tips

Linux query

waltesefalcon

Yoda
Platinum
Country flag
Offline
If you are the only user on a system running Linux why type 'sudo' into the command line instead of just whatever command you want? What's the point of running a command as a superuser if you are the superuser?
 
Walter,

Permissions don't change because you're the only user you've added to the system. There are many 'users' defined by the operating system. Look at the /etc/passwd file. Each line represents a user. By default you're a normal user, until you use the sudo command.
 
That extra step for the superuser password stops the system to wait for your manual input. Without that, malware could do a lot worse to your system.
 
The real reason is so you don't shoot yourself in the foot. You should never run as superuser except when absolutely necessary. As SU you have absolute power over the system, including the power to accidently erase it. In fact it is strongly advised to not even use the su command except in extreme situations. Before retiring, I did use superuser a few rare time supporting Unix customers. After several years on Linux exclusively now I never had the need. Sudo works just fine for everything I need to do.
 
The real reason is so you don't shoot yourself in the foot. You should never run as superuser except when absolutely necessary. As SU you have absolute power over the system, including the power to accidently erase it. In fact it is strongly advised to not even use the su command except in extreme situations. Before retiring, I did use superuser a few rare time supporting Unix customers. After several years on Linux exclusively now I never had the need. Sudo works just fine for everything I need to do.
That makes sense. I didn't know there was a different between SU and Sudo. I thought Sudo was having the system run as superuser.
 
Sudo just lets you run one command as SU so it can also be dangerous. In this case though you need to do one specific thing and are unlikely to do it by accident.
 
Back
Top