Dev Set up on El Capitan 10.11.2 - Part 1

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):

  1. Open Terminal
  2. Type “git clone”

    Terminal - Step 2

  3. A window should pop up.
  4. 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

  5. Click on “Install” instead of “Get Xcode”
  6. Accept the agreement

    Accept agreement

  7. The download begins.

    Downloading command line developer tools

  8. While that downloads, lets customize Terminal and set up a .bash_profile file in our home directory
  9. Open Terminal’s Preferences

    Click on Preferences

  10. Go to the Profiles Tab

    Terminal Profiles Tab

  11. Create a New Profile Theme

    New Theme

  12. Name it whatever you want. I chose Idle Fingers because I used the colors from the Idle Fingers Theme.

    New Theme

  13. Set Colors
    • Background / Colors and Effects: #323232
    • Text / Text: #EBDFBB
    • Text / Bold Text: #4278B2
    • Text / Selection: #B8332D

    Set colors

  14. Set Idle Fingers Profile to default

    New default theme

  15. Go back to Terminal

  16. We need to show hidden files; type “defaults write com.apple.Finder AppleShowAllFiles YES”

    Show hidden files

  17. Relaunch Finder

    Relaunch Finder

  18. Go back to Terminal, Type ls -lah to check if .bash_profile exists

    ls -lah

    check if .bash_profile exists

  19. Type “touch .bash_profile”

    touch .bash_profile

  20. Type “open .”

    open .

  21. Find the .bash_profile and right click

    .bash_profile

  22. 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

  23. Add the script to change colors, alias and some more scripts to make life easier.

    Github gist for the script

    Bash Script

  24. Save it.
  25. Go back to Terminal
  26. Type “source .bash_profile”

    source .bash_profile

  27. Test one of the alias by typing one of the aliases like small letter L “l” for “ls -lah”

    type l

  28. At this point, The Command Line Tools was successfully installed. (Forgot the screenshot)
  29. Go to Terminal and type “git”

    Git installed via the Command Line Developer Tools Installation

  30. Relax. Part 1 is done. Yay!