How to Install Grunt & Grunt-cli on Ubuntu

Grunt is a Javascript task runner that can be used to compile Sass, run JSHint, or run many other plugins. Grunt has a long list of plugin to perform tasks provided by its community. It depends on the Node.js package manager, npm. In this article we will explain how to install Grunt & Grunt-cli on Ubuntu.

Install Grunt

Install Node.js & NPM

Before installing grunt you need to install node.js on your system first. Use following set of commands to add node.js ppa in your Ubuntu system and install node.js

# sudo apt-get install python-software-properties
# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# sudo apt-add-repository ppa:chris-lea/node.js
# sudo apt-get update
# sudo apt-get install nodejs

To Make sure that node.js has installed successfully, execute the following command:

# node --version
v6.3.1
# npm --version
3.10.3

Install Grunt using NPM

Now use following command to install grunt and grunt cli using npm in your Ubuntu system.

# sudo npm install -g grunt
# sudo npm install -g grunt-cli

After successful installation make sure grunt has been installed successful and check version.

# grunt --version
grunt-cli v1.2.0

Enjoy it!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.