The first thing you should install is Xcode because it is the prerequisite for brew and many other development tools.
Xcode setup
Download and install it from the App Store or from Apple's website.
CommandLineTools
For installing Xcode command line tools, run:
xcode-select--install
It'll prompt you to install the command line tools. Follow the instructions and you'll have Xcode and Xcode command line tools both installed.
Verify installation of Xcode Command Line Tools
xcode-select-p# You should see:# /Library/Developer/CommandLineTools
Check that you can run git:
git--version# You should see: (latest version)# git version 2.30.1 (Apple Git-130)
Just to be certain, verify that gcc is installed:
gcc--version
If all went well, you should see the GCC version in the output.
It will show something like this:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Developer Mode
Enable Developer Mode on this Mac so that you can use debugger and other dev tools
# check statusDevToolsSecurity-status# DevToolsSecurity -status -verbose# substitute your username in palace of <username>DevToolsSecurity-enable# orsudodscl.append/Groups/_developerGroupMembership<username>
Work Directories
Go to terminal and run the following commands:
Create directories in user home
# Developer directory contains developer projects/code organized based on programming language mkdir~/Developer# Applications directory contains Apps you downloaded and install (VSCode, subllimtext, IntelliJ etc). # You don't need to have admin access to install apps into ~/Applications mkdir~/Applications
# directory to install/copy developer CLI tools such as `gcloud` `appcli` etcmkdir-p~/Developer/Appsmkdir-p~/Developer/Work# Make `SPA`, `go`, `java` etc directories under ~/Developer/Work:mkdir-p~/Developer/Work/toolsmkdir-p~/Developer/Work/nodemkdir-p~/Developer/Work/SPAmkdir-p~/Developer/Work/gomkdir-p~/Developer/Work/rustmkdir-p~/Developer/Work/javamkdir-p~/Developer/Work/python
Then you can check out your GitHub projects into respective directories