Questions tagged [whoami]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

In script : ssh and then sudo rootsh root

Can't find the solution. I need in the script - ssh to a server then change to root via sudo /usr/bin/rootsh -i -u root. Then make some action then go back and carry on with script... Something like ....
1
vote
0answers
53 views

How to fix MPU9250 configuration issue in device tree?

I have set up an i2c protocol which detects the mpu9250 at address 0x68. Now I want to configure the mpu and I have updated my dts file with the following lines of code: mpu9250@68 { compatible = ...
9
votes
1answer
2k views

Different outputs for `w`, `who`, `whoami` and `id`

In command line platforms online, like for instance the one on Codecademy, when I run for cmd in w who whoami id do echo $cmd $cmd echo ========================= echo " " ...
6
votes
2answers
3k views

Using whoami to search for files that mention user

I'm currently working through some exercises to try and improve my shell scripting. The requirements of the script are as follows: It must get the user's name using the whoami command and store ...
7
votes
3answers
13k views

who, whoami, and “who am i”

I can understand the commands who and whoami, but what exactly happens when I type: who am i and who am I am on Ubuntu, nothing happens after them! Why doesn't Linux / UNIX reply with an error ...
0
votes
1answer
817 views

Using export USER=myName doesn't change the output of whoami

I saw this example $ whoami MatsP $ g++ -Wall -std=c++0x getenv.cpp $ ./a.out MatsP $ export USER=DonaldDuck $ ./a.out DonaldDuck but for me it doesn't work. I am in a Debian machine. I used ...
5
votes
1answer
4k views

Difference between logname and $LOGNAME

While reading about environment variables, the one I came across was LOGNAME, I'd like to know the difference between this variable and whatever the command logname returns - as both of them did ...
0
votes
1answer
4k views

$USER != whoami

I'm trying to re-install homebrew on my mac. I get this error: michaels-1856:~ michael.snowden$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ==> This ...
4
votes
3answers
45k views

Difference between who and whoami commands

The man page description of who command is who - show who is logged on But there exists a similar command whoami. The man page description of whoami is whoami - print effective userid Can anyone ...
5
votes
1answer
2k views

What does su - `whoami` command do?

I am running a script in my project and I see this command su - `whoami` I am having a few basic questions: What does this command do ? What is the significance of `` quotes outside the whoami ...
28
votes
2answers
7k views

Is `who mom likes` a real linux command?

I stumbled across a blog that mentioned the following command. who mom likes It appears to be equivalent to who am i The author warns to never enter the following into the command line (I ...
7
votes
1answer
16k views

A command that gives username@hostname:pwd

I know that pwd gives the current working directory, hostname gives the current host and whoami gives the current user. Is there a single unix command that will give me the output of whoami@hostname:...
9
votes
3answers
18k views

`who am i` after `su` not showing new user id?

Why is it that when I switch user su <username> and then execute who am i is outputs the previous user which I was logged as and not the one I've switched to?