Use command whoami. Use echo $USER.
Home » ArticlesGet Current User in Bash2024-02-22 · 1 min · 6 words · alikia2x · Visits: | Translations:🇨🇳 简体ä¸æ–‡ | Suggest edit on GitHubUse command whoami.Use echo $USER.