Home > Operation and Maintenance > CentOS > How to run sh on centos?

How to run sh on centos?

coldplay.xixi
Release: 2020-07-06 15:18:31
Original
15775 people have browsed it

How to run sh files in centos: 1. Set permissions first, the command is [chmod x ****.sh]; 1. Directly [./] plus the file name [.sh] to run; 2 , directly sh plus the file name [.sh].

How to run sh on centos?

How to run sh file in centos:

1. Add directly ./ The file name is .sh, for example, when running hello.sh, it is ./hello.sh [hello.sh must have x permissions]

2. Direct sh and add the file name .sh , such as running hello.sh as sh hello.sh [hello.sh can not have x permissions]

If there is no permission. Then set the permissions first, the command is as follows:

chmod + x ****.sh
Copy after login
  • cd to ****.sh #Under the file path

  • ./****.sh #Execute this ****.sh file

##Related learning recommendations:

centos tutorial

The above is the detailed content of How to run sh on centos?. 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