Setting up your Mac for software Development

image credit: ebay.co.uk

Got a new mac for software development? Don’t worry. Set up your mac using the following instructions:

Install Homebrew:

Homebrew makes installation of software on mac easier. To install homebrew copy and paste the following command on the default terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

When you enter this command, you might be required to install command line tools if it isn’t installed already. Follow the instructions on your mac to install command line tools.

Possible errors:

Error: Checksum mismatch.

Error: Checksum mismatch.Expected: 033ac518bb14abdb1bb47d968dc9e967c3ae2035499383a21a79b49d523065d1Actual: 045ecc8e047b1c6eb1d5c80e1a71f451d5506a5aad3ebe473fe11b9c4698aafdArchive: /Users/yourname/Library/Caches/Homebrew/portable-ruby-2.3.7.leopard_64.bottle.tar.gzTo retry an incomplete download, remove the file above.Error: Failed to install vendor Ruby.Yourmac-MacBook-Pro:~ oluebubeegbuna$ rm -rf /Users/yourname/Library/Caches/Homebrew/portable-ruby-2.3.7.leopard_64.bottle.tar.gzYourmac-MacBook-Pro:~ yourname$ brew doctor==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.7.leopard_64.bottle.tar.gz

If you have this error possibly, a file must have been broken, you need to uninstall and reinstall the file. To do this, copy and paste this. Make sure you edit the name of your mac and file path when you copy.

rm -rf /Users/yourmac/Library/Caches/Homebrew/portable-ruby-2.3.7.leopard_64.bottle.tar.gz

Install zsh:

Zsh is a unix shell that is built on top of the default shell your mac comes with. Bash.

To install Zsh copy and paste the following command:

brew install zsh

Install oh-my-zsh

Oh-my-zsh is an open source framework that enables you manage zsh.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install iterm2

By default your mac comes with a terminal, however, you might want a customisable terminal and this is why you should get iterm2. To install iterm2:

brew cask install iterm2

To add a material design theme to iterm2, cd into the downloads folder and then download the material design theme:

curl -O https://raw.githubusercontent.com/MartinSeeler/iterm2-material-design/master/material-design-colors.itermcolors

Launch iterm2 and click on preferences. In preferences, go to general and them colors. Find the color presets at the bottom right hand corner and click on import to import the theme you downloaded. It would automatically change the theme for iterm2.

Install git

Most times mac comes with a preinstalled version of git which you can use. If however, you do not want to use it, you can install git using the following steps:

  1. Move default git to new folder
sudo mv /usr/bin/git /usr/bin/default-git

2. Install git

brew install git

Git linking is done automatically but if in your case it does not, link it using the code below:

brew link --force git

Check for the version of git installed:

git --version

Install node

Depending on your stack, you may need to install node. Node installation installs both node and npm.

brew install node

To ensure installations were done check for the versions on node and npm installed.

node --version
npm --version

Install Visual Studio Code

I personally use visual studio code, you can look out for how to download your preferred code editor online.

brew cask install visual-studio-code

Set your visual studio code to autosave if you want to.

At this point you can start cloning or starting new projects!

Look out for the next article on using zsh aliases on the terminal for better experience and Changing the default terminal for visual studio code.

--

--

Oluebube Princess Egbuna
Facebook Developer Circles Lagos

Oluebube, affectionately known as Bube, is an award-winning software engineer in the cloud native space, with over eight years of experience.