Lynna Jackson
Lab/Classroom Computer and Software Managment
Skip to content
Lynna Jackson
  • Home
  • The 100 mile view
← Windows 10 – Creating Image for Windows to Go external disks
MacOS – Disabling Sleep option from Finder menu →

MacOS – Script – Getting the logged in user

Posted on September 6, 2019 by Lynna Jackson

loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

For more details see:
https://scriptingosx.com/2019/09/get-current-user-in-shell-scripts-on-macos/

This entry was posted in Labs and tagged Command, Macintosh, Script. Bookmark the permalink.
← Windows 10 – Creating Image for Windows to Go external disks
MacOS – Disabling Sleep option from Finder menu →

Comments are closed.

  • Tags

    Active_Directory Adobe AFP ARD Background Boot Bootcamp Chrome Command Default User DEP Deployment Dual_Boot El Capitan External boot GIS Group_Policy High Sierra Image Installer JAMF KACE Keyserver Kiosk Lion Login Macintosh Matlab Mavericks Mt Lion Novell Packaging Reference Security Silent Installer SIP Sleep Software Spss Startup User_Profile VectorWorks Windows Windows 10 Windows to Go
  • Contact Me

    Contact me by email ... [email protected]
  • Login

    • Log in
© 2026 - Lynna Jackson
Proudly powered by WordPress. Weaver by WeaverTheme.com