3

Environment:debian8+lxde.
There are two terminal in system tools:LXTerminal and Root Terminal.

enter image description here

When to login with a normal user (not root user),and System tools--Root Terminal,you can have administrator privileges.

What is the differece between executing command in root terminal and executing it with sudo in LXTerminal?

3 Answers 3

1

From man page sudo:

sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.

So in such case sudo is a tool, but root is a user.

and when you use root terminal that mean you are logging in with user root.

and when you run a command using sudo, you actually asking root (by default) to run it for you, and there is a log that log every calling for sudo in /var/log/auth.log, so at the end both of them run the command by user root.

0

The Root Terminal : A terminal for the root user , it can be opened by clicking on the Root Terminal or from the lxterminal through gksu lxterminal (LXDE) or gksu konsole (KDE) after asking for the root password.

The LXTerminal is used by both Root and users , users will be asked for the sudo password

0

The difference can be seen like this: when you use root priviledges, you can do "anything", including installing malwares, deleting important or critical files, etc.

login as a regular user is good, because your rights (and hence the damages) are limited. You can lose all your documents, but not mess up (too much) your system.

Think about sudo as holding the crown (aka, the root priviledges) for a limited time. You are king while you hold the crown (ie, you are root while the sudo lasts), but before and after that you are a regular user, with limited rights so with limited capabilities to damage things other than your own files.

From a security point of view this is preferable to having a root terminal opened, where you would need to be really careful about every commands you type, at all time.

Sudo allows you to run commands when needed, and be back to your regular user faster.

The root terminal however can be usefull if you are about to run many commands as root. But for regular users usage, this almost never happem.

(logging as root is even worse: then every thung you run (browser, etc) run as root and a malicious user (or a mistake) in any of those programs could install a rootkit, or delete more than it should)

You must log in to answer this question.

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