DISQUS

Tech-Recipes: Solve your UNIX identity crisis | UNIX | Tech-Recipes

  • Anonymous · 5 years ago
    whoami (all run together) also works.
  • nitro · 4 years ago
    > whoami (all run together) also works.

    It's not quite the same. Let me explain:

    "who am i" shows who you are initially logged on as.
    "whoami" shows who you are su'd to.

    For example, if I login as nitro, then su to root, the results are as follows:

    # who am i
    nitro pts/2 Jan 7 09:09

    # whoami
    root