Real user

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_real_user

Purpose

Print the non-root invoking user or the current user.

Output

Writes SUDO_USER when it is set and not root; otherwise writes id -un.

Returns

  • 0 on successful output; otherwise the status of id -un.

Usage

  sgnd_real_user