Online Linux Terminal Logo
OnlineLinuxTerminal
Система и процессыCLI Manual

$whoami

Print the effective username associated with the current shell session.

Синтаксис командыPOSIX Standard
whoami [OPTIONS]
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

`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.

Основные флаги и параметры команды

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

Практические примеры использования

#1Check active user identity

Prints current session username.