Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
| #!/bin/bash | |
| # | |
| # Set up OSX preferences | |
| # | |
| # Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| ########################################### | |
| # CONFIG | |
| HOSTNAME="machiavellia" | |
| TIMEZONE="America/Chicago" # 'systemsetup -listtimezones' |
| ################################################################################ | |
| # Prevent OSX calling home # | |
| # # | |
| # Mix of different /etc/hosts files found over internet, and calls filtered # | |
| # using LittleSnitch for months. # | |
| # # | |
| # OSX sends a huge amount of requests to Cuppertino, even when you don't use # | |
| # Spotlight suggestions, iCloud, updates and other services. Even if they are # | |
| # disabled. # | |
| # # |
| # /etc/logrotate.d/cloudflared | |
| /var/log/cloudflared/cloudflared.log { | |
| rotate 7 | |
| daily | |
| compress | |
| missingok | |
| notifempty | |
| } |
Get old OS X/ macOS installer from the App Store via mas.
Direct links prioir to Catalina via Rich Trouton
Direct link: https://apps.apple.com/gb/app/macos-monterey/id1576738294
| #!/bin/sh | |
| # Set the macOS installer path as a variable | |
| MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
| MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
| echo "macOS installer is \"$MACOS_INSTALLER\"" | |
| # Set the target disk as a variable | |
| TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
| echo "Target disk is \"$TARGET\"" |
To support my open-source work, consider adding me on Patreon.
An easy to refer to document for regularly setting up macOS 10.15 Catalina.
The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.
| #!/bin/bash | |
| CYAN="$(tput bold; tput setaf 6)" | |
| RESET="$(tput sgr0)" | |
| clear | |
| if command -v python3 > /dev/null 2>&1; then | |
| if [ $(python3 -c "print('ye')") = "ye" ]; then | |
| clear |