Linux under SH file run and desktop environment double-click Run SH file

Source: Internet
Author: User

SH file run:

1. Modify to execute permissions:

chmod u+x hello.sh

2. Operation

./hello.sh

3, do not use executable permissions to modify, with SH direct operation

Sh./hello.sh

Desktop Environment Double-click Run sh file:

Mac:

1, modify the suffix sh to become command:hello.sh->hello.command

2. Modify executable permissions: chmod u+x Hello.command

Ubuntu:

1. Modify executable permissions: chmod u+x hello.sh

2. Open a folder arbitrarily, select "edit", "preferences" in the upper left corner

You can run a double-click by selecting "Run them when you open executable text files."

Reference:

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

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

Linux under SH file run and desktop environment double-click Run SH file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.