Hi, I have a question for you: when transferring data to another Mac—when we’re setting up a new Mac and transferring data to it—are the Terminal settings included in that process? Or do you have to configure everything from scratch?
I've never done this before, and I’ve been wondering about it lately. Of course, I want to clarify that I mean Terminal settings like making sure the Mac doesn’t turn on automatically when you open the lid, and so on. Basically, everything I’ve set through the Terminal—will that be preserved?
By Ines, 26 July, 2025
Forum
macOS and Mac Apps
Comments
Don't think so
Although I never transfer settings from Mac to Mac, I strongly believe that what you ask for specifically never gets transferred, because those are firmware-related settings that are commonly stored in dedicated non-volatile memory, and some settings stored there can actually prevent the system for working correctly or booting. In the case of Intel-based Macs, bad firmware settings can even prevent the system from powering up, requiring pressing a specific key combination to reset those values to restore the system back to a working condition.
To print the variables along with their respective values in Terminal, type:
To print the current value of a specific variable in Terminal, type:
To change the value of a variable in Terminal regardless of whether it already exists, type:
I strongly advise against changing variables that you don't understand, and copy-pasting the names of those you do to prevent accidentally cluttering that space with useless misspells. Also keep in mind that changing a variable overwrites whatever value was previously set, and in some binary value cases, like the power-on boot preferences that you mentioned, combining values is not trivial to people without some development experience since it involves bitwise operations. Finally beware that Intel-based and ARM-based Macs expect completely different and incompatible firmware settings, so sharing the same variables and values between the two architectures will most likely not produce the expected result.
Some variables might require administrator privileges to set or change their values, in which case you must prepend the
sudo
command before thenvram
command and then authenticate for the operation to take effect, as follows:In some cases variables can only be changed from the recovery system, and there are even cases that only software that is ultimately digitally signed by Apple can make changes, so if you get "Operation not permitted" error messages for some variables even after authenticating as a system administrator or booting into recovery, those are the reasons.
Finally, if you wish to prevent an ARM-based MacBook from powering on by a lid open event, I recommend just following the official instructions and doing it manually instead of copying firmware settings from another Mac.
That’s what I thought too, but I was just asking out of pure cur
I mean, I’m not transferring the data just yet. That’ll probably happen in, say, at most two years. But I started wondering—if I restore a new Mac from a backup of my current one, will the Terminal data also carry over? I honestly doubt it, but I still wanted to ask, just out of curiosity, and to hear from people who know more than I do.
If it doesn’t transfer, I’ll just re-enter everything in the Terminal manually. Still, it’s a bit of a shame, because I’ve made a few changes there and I’m afraid I might not remember all of them.
Anyway, thanks for the answer. Oh, and I’ll just add that the data will be transferred from a Mac with an M2 chip to some newer M-series Mac :)
Safely transferring firmware settings between ARM-based Macs
Since you can no longer remember all the changes you made to firmware settings, one strategy is to dump the current settings from both Macs, compare them to get the differences, extract anything that remind you of changes that you might have made, and selectively apply those to the new Mac. If you mess up, the worst that can happen with an ARM-based Mac is to prevent it from booting with a visual error message instructing you to browse a support page on the Apple website, in which case the problem can be fixed by turning the system off, pressing and holding the power or TouchID button for a while until the boot options menu appears (there's no audio feedback for this but 15 seconds should be long enough), pressing Command+F5 to enable the firmware VoiceOver, booting into recovery, entering the required credentials to decrypt the storage, wiping all the current settings, and finally restoring the original settings that you saved earlier.
Unfortunately due to the overly conservative security protections implemented by Cloudflare and used by AppleVis, I am unable to post a comment with the commands required to do what I mentioned above, so if anyone wishes to know, feel free to message me privately using the link on my profile to which I will reply by E-mail. Alternatively, if the AppleVis administration decides to actually address this problem that has been recently affecting at least my comments, I can update this comment to post my original message.