美文网首页
运行命令一样运行脚本

运行命令一样运行脚本

作者: ifeelok | 来源:发表于2018-11-18 18:55 被阅读0次

How to run scripts without typing the full path?

I'd like to know if there is a way to run program/shell script without typing full path:

/opt/idea/bin/idea.sh

You can just create symlink. Create it in /usr/local/bin. All you need is to run command:

sudo ln -s /full/path/to/your/file /usr/local/bin/name_of_new_command

After that you should make your file executable:

chmod +x /full/path/to/your/file

Now you should be able to run name_of_new_command at any time in your terminal.

相关文章

网友评论

      本文标题:运行命令一样运行脚本

      本文链接:https://www.haomeiwen.com/subject/lnwgfqtx.html