Dom0 terminal - Root Privilege

I am a new user of Qubes OS, opening the Dom0 terminal and accessing root user privileges, I noticed the following difference:

1)By typing the command “sudo -i” I become the user: [root@dom0 ]#.
2)By typing the “su” command and then entering the password of the root user (activated during the installation of Qubes OS), I become the user: [root@dom0 “username”].
specifying: “username”=name of the user account.

In both cases, typing the “id” command gives me the same result.
So I wanted to know if there was a difference in accessing root user privileges using the two methods ( point “1)” and “2)” ) mentioned?

1 Like

Try and compare the environment you get with:

  1. su
  2. su -
  3. sudo -i

eg by running:

env | sort > /tmp/cmd_index.txt

and

diff /tmp/cmd_2.txt /tmp/cmd_3.txt

When you compare sudo -i and su - you’ll probably see very similar environments … where as su differs from su - and sudo -i.

If su - and sudo -i are very similar, then I think this will explain the difference between them and su:

:slight_smile:

3 Likes

Same link on my AnonymousOverflow instance:

2 Likes