Mac OS

Installing PHP on Mac OS

Installing PHP is more than just installing the PHP source code on the system. Several libraries are also required to connect to databases, connect to GD, support XML, get LDAP access and so on. All these have to be installed manually on the machine. You can go through the painful process of manual installation and configuration or simply download and install a ready-made package from

Unless you have very specific needs, you should use this package.

Print screen on Mac

The Mac OS keyboard does not have a print screen button. So this is how to capture your screen on Mac:

  • Hold down Apple key ? + Shift + 3 and release all

The screen shot would appear on your desktop.

You can also do a screen capture for a portion of your screen.

  • Hold down Apple key ? + Shift + 4 and release all key
  • Mouse cursor would change to +
  • Select the region you wish to capture


Setting up multiple displays on Mac OS

It is now common for users to work with multiple monitors. Laptop users, especially, prefer to work on their laptop screen and an external monitor when at they at work or at home. If you are using netflix or some other service to download movies, you would prefer to watch it on large screen rather than your laptop screen, so you would want to connect your computer to a TV or projector.

It is very easy to connect Mac OS computers to external monitors.

How to make scroll bar show in Mac

By default, Mac scroll bars show only after keyboard or trackpad movements. This can be very annoying because often the scroll bar disappears before you can get to it. The solution is to make Mac show the scroll bars by default.

  1. Go to Apple icon
  2. Click on System Preferences
  3. Click on General Preferences
  4. For "show scroll bars", choose always

You no longer have to be frustrated by missing scroll bars.

Getting started with Homebrew

Homebrew is a package manager for Mac OS.


  1. Download and install Xcode from Mac store if you don't already have it installed
  2. In a terminal, type the following code

    xcode-select --install
  3. Run the following command

    ruby -e "$(curl -fsSL"    

Some commands

brew search Search for an application:

Getting started with Git

A version control system keeps track of changes in code. It keeps track of every change made by every developer. It allows code bases to be branched and then merged back. You can also go back in time to a point before you introduced something in the code. Version control is absolutely essential for software development.