1

Is there a difference in outcome or application behaviour by installing packages with

sudo -i
apt install something

versus

sudo apt install something
4
  • It is the same thing as long as you do not use "I/O redirection".
    – FedKad
    Sep 1, 2020 at 16:26
  • If that is the case, would you mind posting an answer stating so? Sep 1, 2020 at 16:47
  • Read man sudo.
    – waltinator
    Sep 1, 2020 at 23:25
  • hey waltinator, thanks for the valuable contribution Sep 2, 2020 at 17:15

2 Answers 2

3

If you're talking solely about using the apt command, the two invocations are identical. Other commands that may depend on environment variables and such could potentially act differently.

2

Is there a difference in outcome or application behaviour by installing packages with

No, but that is not what "sudo" is about.

1 of the key features of "sudo" is the ability to track and trace directly who issued the command. Where "sudo" logs it as the user that issued it. Doing it from "root" will log it as "root.

Not an issue for a single admin system but a serious problem when there is more than one admin on a system and a command was issued that was not supposed to be issued.

1

You must log in to answer this question.

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