Home 🔥 macOS (CheatSheet)
Post
Cancel

🔥 macOS (CheatSheet)

How to use ?

Enable in Security / Confidentiality the Install From everywhere Button

1
sudo spctl --master-disable

Show Hidden Files

1
defaults write com.apple.finder AppleShowAllFiles -boolean true; killall Finder

Hide Hidden Files

1
defaults write com.apple.finder AppleShowAllFiles -boolean true; killall Finder

Display IP Adress

1
ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\  -f2

Flush DNS

1
2
dscacheutil -flushcache
sudo killall -HUP mDNSResponder

Run Software Updates

1
2
3
4
5
6
softwareupdate --all --install --force 
# add this flag to restart computer after installing updates : --restart

## If the above command showed no update
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

Usefull Symboles

1
2
3
4
5
⌘ is the Command () key.
⌃ is the Control key.
⌥ is the Option (alt) key.
⇧ is the Shift key.
⇪ is the Caps Lock key.

🔥 macOS Apple Store CLI MAS

Install tools

1
brew install mas

Search

1
mas search Spark

Download

1
mas install <ByID>

🔥 macOS Downloader

This command will allow you to download any macOS installer App ! Just name a version and you are good to go.

Versions can be found here : MacOS_version_history

List available installers

1
softwareupdate --list-full-installers

Upgrade command (Only)

1
2
MACOS_VERSION="12.1" # for Monterey
softwareupdate --fetch-full-installer --full-installer-version $MACOS_VERSION

Make a Bootable IMG

1
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/UNTITLED --nointeraction

Download all versions

1
... # on Progress

Enjoy :)

This post is licensed under CC BY 4.0 by the author.
Trending Tags