whoami command in Linux is used to display the name of the currently logged-in user in a shell. It displays the user name associated with the current effective user ID.

Uses of whoami command with example

To get help about whoami command and find available options for whoami command, use whoami --help command.

whoami --help

whoami --help command in linux

Display current version

To display the currently installed version of the whoami command use whoami –version command.

whoami --version

whoami --version command in linux

Using whoami command

whoami

whoami command in linux

sudo whoami


Linux command with examples

A


adduser  |  addgroup  |  alias  |  anacron  |  apt  |  aptitude  |  arp  |  at atq  |  atrm  |  awk


B


basename banner | batch |  bc  |  bg  |  bzip


C


cat cal  |  cd  |  chgrp  |  chown  |  cksum  |  chmod  |  clear  |  cmp  |  comm  |  cp


D


date  |  dd  |  df  |  diff  |  dir  |  dmidecode  |  du


E


echo  |  eject  |  env  |  exit  |  expr


F


factor  |  find  |  free


G


grep  |  groups  |  gunzip  |  gzip


H


head  |  history  |  hostname  |  hostnamectl  |  htop  |  hwclock  |  hwinfo


I


id  |  ifconfig  |  ionice  |  iostat  |  ip  |  iptables  |  iw  |  iwlist


J


K


kill  |  kmod


L


last  |  less  |  ln  |  locate  |  login  |  lp  |  ls  |  lshw  |  lscpu  |  lsof  |  lsusb


M


man  |  mdsum  |  mkdir  |  more|  mv


N


nano  |  nc  |  neofetch  |  netcat  |  netstat  |  nice  |  nmap  |  nproc


O


openssl


P


passwd  |  pidof  |  ping  |  pr  |  ps  |  pwd  |  pstree


Q


R


rdiff-backup  |  reboot  |  rename  |  rm  |  rmdir


S


scp  |  shred  |  shutdown  |  sleep  |  sort  |  split  |  ssh  |  stat  |  su  |  sudo  |  sum


T


tac  |  tail  |  talk  |  tar  |  tee  |  time  |  tree  |  top  |  touch  |  tr


U


unalias  |  uname  |  uniq  |  unzip  |  uptime  |  users


V


vim  |  vi


W


w  |  wall  |  watch  |  wc  |  wget  |  whatis  |  whereis  |  which  |  who  |  whoami


X


xargs


Y


yes  |  youtube-dl


Z


zcmp  |  zdiff  |  zip  |  zz

Sharing is Caring
Scroll to Top