My custom bash prompt

I wanted more information in my bash prompt, such as date/time and the directory I was in.  Here’s what it looks like:

bash_prompt

And this is what I added in my ~/.bash_profile:


PS1='${debian_chroot:+($debian_chroot)}\d \T > \[$(tput sgr0)\]\[\033[01;32m\]\u@\h\[\033[00m\] : \[\033[01;34m\]\w\[\033[00m\]\n\$ '

Run source ~/.bash_profile and enjoy. 🙂

BTW, there’s also a website that you can use to create your own: http://bashrcgenerator.com/.

Enable root in OS X Yosemite and El Capitan

I needed to do some file moving between users and noticed my admin account didn’t have access, so I tried “su” and “sudo” without success. Apparently, like it Yosemite, root access is disabled by default. Here’s how to enable it:


1. Open Directory Utility (I usually do it via CMD + spacebar, then type "dire")
2. Go to the Edit menu and select "Enable Root User".
3. Enter your desired root password twice.
4. That's it!

Test it out in the terminal by doing:


$ su -

Happy rooting, yo!

Homebrew: How to install on OS X

Since moving to OS X in 2011/2012 for work to do all my development, I’ve moved Homebrew to a must-have. Adding it here for archiving purposes.

From a terminal:


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

2. brew tap caskroom/cask

The 2nd point is to install Homebrew Cask as well, which extends Homebrew’s functionality.

Now get brewing!