$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.12.4 (16E195)
Kernel Version: Darwin 16.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: lap
User Name: Viktor (viktor)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 1 day 3:09