All articles
Last comments
kardamom
Jesús, for "libpackagekit" run: sudo apt-get install packagekit-backend-aptcc
Guest Michael
This is my favorite GUI text editor for Linux, I use the Windows version all the time too. I also covered this topic here.
Andrii
I'm using Mint Cinnamone installed on virtual machine VMWare. The instruction helped me to adjust my mouse scroll wheel speed. I set the value to 6. Now it's comfortable to use the mouse. Thanks a lot!
Shekin
Cecilieaux Bois de Murier, 1. Silentcast 2. I haven't checked, but I think that it is possible to do in the program SimpleScreenRecorder
Cecilieaux Bois de Murier
Is there an application that imports stills into a GIF?
Archive
«    January 2017    »
MonTueWedThuFriSatSun
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
» » How to know current user in Linux Mint?

How to know current user in Linux Mint?

How to know current user in Linux MintHow to know current user in Linux Mint

I would like to tell how to get the current user name in Linux Mint (or any popular Linux distribution). I only used a few but found a few which didn't know.

Sorry for the spelling and phonetic errors in the text.
Owner and main writer of MintGuide.org is not a native English speaker.


The easiest way to obtain the current user is to run the following command:

whoami

Also, you can use environment variables and display the following option:
echo $USER

Also, you can retrieve a user by ID:
id -u -n

Also, you can get user's PID:
ps -o user= -p $$ | awk '{print $1}'

Good Luck!!!

Related Articles

1 comment

mlauzon
Whoami: shows just my username which is expected.

echo $USER: see above.

id -u -n: see above.

ps -o user= -p $$ | awk '{print $1}': see above.
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
    winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
    worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
    expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
    disappointedconfoundedfearfulcold_sweatperseverecrysob
    joyastonishedscreamtired_faceangryragetriumph
    sleepyyummasksunglassesdizzy_faceimpsmiling_imp
    neutral_faceno_mouthinnocent
Login via
This website about Linux
Up