Before installation, it is assumed that node is available, which can be queried as shown here. If the node is not available, then the installation of node is required first in order to install truffle:
$ node -version v7.2.1
The installation of truffle is very simple and can be done using the following command via Node Package Manager (npm):
$ sudo npm install -g truffle
This will take a few minutes; once it is installed, the truffle command can be used to display help information and verify that it is installed correctly:
$ sudo npm install -g truffle Password: /us/local/bin/truffle -> /usr/local/lib/node_modules/truffle/build/cli.bundled.js /usr/local/lib└── truffle@4.0.1
Type truffle at Terminal to display usage help: