Home > Operation and Maintenance > Linux Operation and Maintenance > How to open software in linux by calling script

How to open software in linux by calling script

王林
Release: 2020-02-14 16:45:43
Original
4525 people have browsed it

How to open software in linux by calling script

Open the terminal and create a folder to store the script file you wrote.

How to open software in linux by calling script

Find the path of the executable program to be opened. Here we take Firefox as an example. There is the Firefox execution program under /usr/bin.

How to open software in linux by calling script

Enter cd /usr/local/myShell to enter the folder just created.

(Recommended learning: linux video tutorial)

Then enter sudo touch openFireFox.sh to create the script file.

How to open software in linux by calling script

Enter sudo vi openFireFox.sh and use vi to edit the file.

How to open software in linux by calling script

#Press i to enter the insert state. Enter:

#!/bin/sh
cd /usr/bin
./firefox
Copy after login

and then press the Esc key to exit the editing state. Press: wq and then press Enter to save the file and exit.

How to open software in linux by calling script

After exiting, enter sudo chmod 777 ./openFireox.sh to modify the file permissions.

Then enter ./openFireFox.sh to open the Firefox browser.

How to open software in linux by calling script

Related recommendations: linux tutorial

The above is the detailed content of How to open software in linux by calling script. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template