Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access The Current User Email and Name from the Bash in Mac OS X

Tags:

bash

macos

Is it possible to access the current user's name and email address from the command line in OS X? If so, how would it be done?

like image 723
Kevin Sylvestre Avatar asked Oct 26 '25 06:10

Kevin Sylvestre


1 Answers

id -F will display the full name of the current user. id is a BSD replacement for whoami, which will be more portable than using osascript.

like image 153
Jeffrey Aguilera Avatar answered Oct 27 '25 20:10

Jeffrey Aguilera



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!