Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Okay, so I want add a command to my Desktop (Or any convenient location), and whenever I run it I want it to clone the HTML5 boilerplate.

$ git clone git://

And I'm tired of typing it out all the time. So how could I store my commands in a file?.

share|improve this question

2 Answers 2

up vote 13 down vote accepted

Open your ~/.bashrc and put this at the end:

alias boil='git clone git://'

or alternatively, this

boil() {
  git clone git://

From now on, in every new terminal you can use the command boil as an alternative to your long command.

The second version is to prefer, because is more flexible being able to accept and manage parameter, for example if you define

boil() {
  [[ -z "$1" ]] && set ""
  git clone git://"$1"/paulirish/html5-boilerplate.git

you can easily change server, if there are mirror.

# without a parameter, the function will use a default
# override the default providing explicitly a server parameter

It is only an example, your fantasy surely will generate something more useful.

Obviously you can add as many functions as you need.

share|improve this answer

Why not create a document with that command, and every time you wish to use it you can simply copy and paste it into the terminal.

share|improve this answer
-1 Because this doesn't answer the question in the way that they are looking for. – James Aug 3 '11 at 18:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.