There are a few different ways to detect if Rosetta 2 is installed on an Apple silicon Mac. Most of them look for a process containing the string
oahd. This is because inside macOS, Rosetta is not referred to by name, it is know as OAH.
Adding to the confusion, Apple has made minor changes along the way that may have affected some scripts or extension attribute’s ability to accurately report Rosetta 2 status. One such change occurred in macOS 11.5 where checking for the LaunchDaemon
/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist stopped working. As a result, most transitioned to checking for a process containing
The Jamf extension attribute below sidesteps these limitations. It first checks if the device architecture is Apple silicon (arm64), then checks if the system is able to run x86_64 intel code using the
arch binary. It follows that if an Apple silicon device can run intel code, Rosetta 2 must be installed, regardless of if the
oahd process is found.
This method is more robust, and less likely to provide a false positive. Additionally, it will not be affected by any future changes Apple may make to Rosetta 2.
Taking that a step further, if we detect that Rosetta 2 is not installed, we will want to get it installed. The following script can be used to do just that.
2 thoughts on “Detecting if Rosetta 2 is Installed on an Apple Silicon Mac”
I believe these should both begin with double hyphens, right?
You are correct, but I think that is a quirk of the formatting. If you view the raw code there are double hyphens.