tongchuan@tongchuan-K42Jv:~$ sudo npm install -g grunt-cli
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.13 /usr/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.7)
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)
tongchuan@tongchuan-K42Jv:~$ grunt
tongchuan@tongchuan-K42Jv:~$ nodejs -v
v0.10.37
tongchuan@tongchuan-K42Jv:~$ npm -v
1.4.28
tongchuan@tongchuan-K42Jv:~$ grunt -v
tongchuan@tongchuan-K42Jv:~$ grunt-cli
grunt-cli:未找到命令
tongchuan@tongchuan-K42Jv:~$ grunt
tongchuan@tongchuan-K42Jv:~$ npm root -g
/usr/lib/node_modules
tongchuan@tongchuan-K42Jv:~$ grunt
tongchuan@tongchuan-K42Jv:~$ grunt -v
tongchuan@tongchuan-K42Jv:~$ gunt
grunt -version 查看版本
你已经安装上了,继续往后看吧。