How to run programs in linux

angryTom
Release: 2019-11-06 14:25:44
Original
5671 people have browsed it

How to run programs in linux

How to run the program on Linux

1. chmod space "x" space your sh file name (x is A whole, do not take it apart).

2. Enter "./your sh file name" to execute.

Example:

1 chmod x helloworld.sh.

2 ./helloworld.sh.

First of all, you need to give the file executable permissions. For example, if your file is a.sh, then you can chmod x a.sh; and then run the file.

When running in this way, a.sh is in the current working directory. If the file is not in the current directory, then you need to use an absolute path to execute, such as: /opt/a.sh; /opt/test/a.sh .

Recommended: Getting started with Linux system

The above is the detailed content of How to run programs in linux. 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