What is the difference between `sudo -i`, `sudo -s` and `sudo su -`?
IntermediateConceptPermissions, Users & sudo
Answer
sudo -i: root login shell, root's environment and home, reads root's profile.sudo -s: root shell keeping much of your environment (and your current directory).sudo su -: works likesudo -ibut chains two programs; logs only "su" in sudo's log.
Prefer running individual commands with sudo so each is logged.
More on Permissions, Users & sudo
Explain the rwx permission model for files and directories.BeginnerHow does octal notation work in chmod?BeginnerWhat does chown do and who can run it?IntermediateWhat is umask and how is the final permission calculated?IntermediateWhat is SUID and give a real example?IntermediateWhat does SGID do on files versus directories?Intermediate