El Capitan and SIP

Upgrading OS X to a newer version normally works like a charme. At least compared to my experiences with linux or Windows.

I use homebrew as a package manager for OS X to fulfil my needs for extra / customized software and packages i use for development purposes. Since i knew from former releases like Yosemite where the installer processes copied /usr/local (where homebrew installs everything by default) file by file and took me 4h to update that this could lead to problems while updating i googled before migrating to El Capitan for issues with homebrew.

Part of the OS X 10.11/El Capitan changes is something called System Integrity Protection or “SIP”.

SIP prevents you from writing to many system directories such as /usr, /System & /bin, regardless of whether or not you are root. The Apple keynote is here if you’d like to learn more.

The following instructions this link provides helped me fixing my homebrew installation.

Basically i had to do

sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

to get my homebrew installation working again.

Furthermore i had to update my oh my zsh installation via


to get rid of some permission errors.

For getting my old PHPStorm8 to work i had to install the Java 6 Runtime again. I will wait a few days before updating my macbook pro which i use for productive development.

Open files from command line on Mac

I tend to use User Interfaces as much as possible because i like them and i like to built them. Nevertheless i am finding myself more and more working on the command line.

Since i never start a project again without build-tools like grunt or gulp or package managers like bower or composer and favoriting a vagrant i spent a lot of time during the development on the terminal.

Btw. i prefer iterm2 as my terminal replacment with, zsh as my shell configured with oh my zsh and the agnoster theme with Sauce Code Powerline font.

my terminal

In some cases you just want to open a file in the current directory e.g. previewing an image or open a HTML file in the browser. Just type

open myimage.png

to open a file with the registered default program for this filetype.

You can also specify the program you want to use for opening the file. In case Chrome is your default browser but you want to open a HTML file in Safari type

open -a Safari index.html

Opening an URL is as simple

open http://www.google.de

To open a directory in Finder type

open .

to open the current folder or specify the folder you want to open

open images/icons/svg/

Opening a file from the command line is as we can see as simple as it should be.