What are the dotfiles?

Dotfiles are a reference for files that start with a full stop, what aims to hidden files. They are generally used for configuration.

We will focus on the files used to configure the OSX and the bash terminal (some may apply to Linux system).

To use the bash terminal, you can use the default app that comes with OSX, but I recommend to use iTerm.

If you want to take a good look, you can go to GitHub where people share their own personal configurations. I recommend you to get one of the more popular and install it, I used the Mathias’s dotfiles and I am really happy with it.

Go ahead and install personalized dotfiles. You will get a good configuration and control over many of the features of the system.

Among the ability to set up any computer with your personal settings, one of the most interesting things is the learning process you have ahead.

Later you can create your own fork like I did so you can have them saved in a safe place with your latest changes.

How to install.

At Mathias’s you can find the instructions. Here are the details.

Go to the directory where you want your dotfiles repository stored. In my case, I decided to create a hidden folder called ~/.dotfiles.

So once you are in the folder where you wish to create the dotfiles folder, you just have to clone them with git.

git clone

Now we have cloned the repository and we need to get into the directory and execute the update command

cd dotfiles && source


A useful feature is the ability to use your own alias. I suggest a look to the well documented .aliases, it is real easy to get used to the alias created.

if you want to create your own alias, Mathias has thought of that with the .extra file. You need to create it and add it to your dotfiles directory. They will spread with the rest of the dotfiles when you source

Here are some of the alias I have:

alias c="clear"

# List all files and recursive directories and sort by size
alias dus='du -hs ./* | sort --n'

Bash Prompt

I like a lot how Mathias has personalized the prompt but I needed a couple of additions.

Here is my prompt:


Adding the time.

I added the time, it is not a live timer, it just prints the time when the terminal prints the prompt.

You can do this adding the following line

PS1+="\[${blue}\]\t "; # The time when the line was printed.

to the .bash_prompt file at the line 111 after

PS1+="\[${bold}\]\n"; # newline

And before

PS1+="\[${userStyle}\]\u"; # username

Adding the Node Version.

If you develop with Node.js, knowing the version you are using is important. I added the version you can see at the end of the prompt.

To do it you can add a couple of lines

PS1+=" ⬡ \$(node -v)" # Node version

At the place where you want to see the node version, in my case I have it in the last place, so I add it before the line 117


I hope this will help you. However if you have any doubts, please don’t hesitate to drop me a line.