首页 > 系统服务 > 详细

Linux下sh文件运行及桌面环境双击运行sh文件

时间:2017-09-02 19:48:52      阅读:2047      评论:0      收藏:0      [点我收藏+]

sh文件运行:

1、修改为可执行权限:

chmod u+x hello.sh

2、运行

./hello.sh

3、不使用可执行权限修改,用sh直接运行

sh ./hello.sh

桌面环境双击运行sh文件:

Mac:

1、修改后缀sh变成command:hello.sh->hello.command

2、修改可执行权限:chmod u+x hello.command

Ubuntu:

1、修改可执行权限:chmod u+x hello.sh

2、任意打开一个文件夹,选择左上角的【编辑】->【首选项】

选择【打开可执行文本文件时运行它们】即可实现双击运行。

技术分享

 

参考:

http://blog.csdn.net/lipeiran1987/article/details/18406535

http://www.cnblogs.com/jackchiang/p/4676984.html

Linux下sh文件运行及桌面环境双击运行sh文件

原文:http://www.cnblogs.com/EasonJim/p/7467457.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!