The $UID holds the numeric user ID that represents the users’ actual identifier, while $EUID holds the effective user ID that represents the effective permissions a user has when executing a command.