Online Linux Terminal Logo
OnlineLinuxTerminal
Sistema y procesosCLI Manual

$whoami

Print the effective username associated with the current shell session.

Sintaxis del comandoPOSIX Standard
whoami [OPTIONS]
Comunidad Linux2.4k En línea

Chatea con usuarios de Linux, aprende comandos y descarga guías PDF.

Prueba en vivo en la terminal interactiva

Simulación del lado del cliente sin instalación y con respuesta inmediata.

Abrir en terminal de pantalla completa ↗
bash — terminal

Descripción general y funcionamiento

`whoami` outputs the username of the currently logged-in effective user. It is widely used in shell scripts to verify whether execution is running under root or an unprivileged service account.

Opciones y banderas comunes

Flag / OptionDescription
--helpDisplay help summary and exit.
--versionOutput version information and exit.

Ejemplos prácticos del mundo real

#1Check active user identity

Prints current session username.