Skip to main content

Linux command: Find current username and userid

https://pixabay.com/en/who-question-information-mark-text-2549178/ by https://pixabay.com/en/users/RossMannYYC-5748266/

Find current username

$ whoami

Using id command

$ id -un

Find current userid

# id

Using USER variable

$ echo $USER

Extract from environment settings

$ env | grep USER

Popular posts from this blog

Data Recovery Softwares

Follow 3-2-1 backup rule so you do not need these data recovery softwares.

IBM Domino: Enable SMTPClientDebug, SMTPDebug

Add parameters to NOTES.ini SMTPClientDebug=1 SMTPDebug=2 Option 1: Add parameters via GUI IBM Domino: Enable SMTPDebug in NOTES.ini Option 2: Add parameters via command SET CONFIG "SMTPClientDebug=1" update Run command to update router configuration tell router update config IBM Domino: tell router update config to update configuration and reload routing table Send an email to @gmail.com to check result IBM Domino: Log file after enabling SMTPClientDebug parameter in NOTES.ini file

Linux command: printenv

printenv - print all or part of environment NAME        printenv - print all or part of environment SYNOPSIS        printenv [OPTION]... [VARIABLE]... DESCRIPTION        Print  the  values  of the specified environment VARIABLE(s).  If no VARIABLE is speci‐        fied, print name and value pairs for them all.        -0, --null               end each output line with NUL, not newline        --help display this help and exit        --version               output version information and exit        NOTE: your shell may have its own version of printenv,  which  usually  supersedes  the        version  described  here.  Please refer to your shell's documentation for d...