创建js文件,第一行写入
执行文件时到全局环境变量下查找node,找到后用node执行文件 #!/usr/bin/env node
创建软连接
cd到node目录(可以使用which node)
创建链接
# ln -s 要执行的js文件路径 命令名 ln -s xxx.js mycommond