Is there a difference in outcome or application behaviour by installing packages with
sudo -i
apt install something
versus
sudo apt install something
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityIf 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.
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.
sudo -i
back to the originating user: serverfault.com/questions/470755/…
Sep 2, 2020 at 7:06
man sudo
.