Setting up a dev environment on a freshly installed El Capitan 10.11.2 on an iMac (2011 Edition) and MacBook Pro (2009 Edition) starting with MacOSX command line tools, customizing a theme for Terminal, and adding a .bash_profile
I found a few upsides on waiting to update to El Capitan. By this time, I didn’t have to deal with the System Integrity Protection (SIP) when installing Homebrew, and I accidentally found out I can install MacOSX command line tools without installing Xcode. Thanks to Git for that accident.
With a fresh El Capitan install, I opened Terminal to git clone some Sketch (BTW, darn you Sketch app for forcing me to upgrade to El Capitan) plugins. This is when I was prompted to Get Xcode or install Command Line tools. Let’s make this TechArticle Part 1 of the series, and these are the starting steps (1-30):
- Open Terminal
Type “git clone”
Terminal - Step 2
- A window should pop up.
You should see: “xcode-select: note: no developer tools were found at ‘/Applications/Xcode.app’, requesting install. Choose an option in the dialog to download the command line developer tools.”
Opt to install Command Line Developer Tools only
- Click on “Install” instead of “Get Xcode”
Accept the agreement
The download begins.
Downloading command line developer tools
- While that downloads, lets customize Terminal and set up a .bash_profile file in our home directory
Open Terminal’s Preferences
Click on Preferences
Go to the Profiles Tab
Terminal Profiles Tab
Create a New Profile Theme
Name it whatever you want. I chose Idle Fingers because I used the colors from the Idle Fingers Theme.
- Set Colors
- Background / Colors and Effects: #323232
- Text / Text: #EBDFBB
- Text / Bold Text: #4278B2
- Text / Selection: #B8332D
Set Idle Fingers Profile to default
New default theme
Go back to Terminal
We need to show hidden files; type “defaults write com.apple.Finder AppleShowAllFiles YES”
Show hidden files
Go back to Terminal, Type ls -lah to check if .bash_profile exists
check if .bash_profile exists
Type “touch .bash_profile”
Type “open .”
Find the .bash_profile and right click
Open with Textedit. (Alternatively you can edit it in Terminal with nano or vim but I’m a bad typer that I’d rather copy and paste selectively from my previous bash_profile file; or you can git clone one from github but I wanted to start fresh.)
open .bash_profile with TextEdit
Add the script to change colors, alias and some more scripts to make life easier.
- Save it.
- Go back to Terminal
Type “source .bash_profile”
Test one of the alias by typing one of the aliases like small letter L “l” for “ls -lah”
- At this point, The Command Line Tools was successfully installed. (Forgot the screenshot)
Go to Terminal and type “git”
Git installed via the Command Line Developer Tools Installation
- Relax. Part 1 is done. Yay!