Sample Header Ad - 728x90

Difference between logname and $LOGNAME

9 votes
1 answer
11878 views
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 differ in what they returned. -bash-3.2$ logname user11 -bash-3.2$ echo $LOGNAME user1 Although, whoami returns the same user as LOGNAME -bash-3.2$ whoami user1
Asked by Keyshov Borate (1359 rep)
Mar 8, 2016, 12:38 PM
Last activity: Mar 8, 2016, 01:11 PM