Situatie
There are situations where you would like to “crosscheck” the username of the current user (connected), for example before running a specific command (of a specific user only).
Solutie
For this you can use the command ‘whoami’ (available on both Unix/Linux and Windows platforms).
for example:
-- For Unix/Linux --- snip --- oracle@fsihost074:$ whoami oracle --- snip ---
-- For Windows : --- snip --- C:\Users\cuser>whoami cuser-ro\cuser --- snip ---
Another similar output can be returned on Unix/Linux by “id” command, as:
-- For Unix/Linux --- snip --- oracle@fsihost074:$ id -un oracle --- snip ---
Leave A Comment?