Question

I want to know how extract by terminal the Darwin version.

https://en.wikipedia.org/wiki/MacOS_Sierra#Releases

For macOS Sierra 10.12.3 is 16.4.0 for 10.12.6 is 16.7.0.

Now, I want to create:

--build=x86_64-apple-darwin$(uname -r)

Is it possible obtain this complete value?

x86_64-apple-darwin16.4.0
Was it helpful?

Solution

That is very simple using uname with the r option.

uname -r

and

sysctl -n kern.osrelease

would give you the same results.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top