User Environment Variables With SU and SUDO
(Doc ID 2733910.1)
Last updated on DECEMBER 23, 2020
Applies to:Oracle Cloud Infrastructure - Version N/A and later
Linux OS - Version Oracle Linux 6.0 and later
Information in this document applies to any platform.
su and sudo allow to execute commands or shell with a different user.
Depending on how they are invoked the environment variables can change, causing different command results.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document
|su - run a command with substitute user and group ID|
|sudo - execute a command as another user|