A medium-level Linux user must always execute the. sh file. Of course, you can double-click the file under the graphic interface, but it is a waste of time.
Now we will introduce the first method: (In ubuntu)
First, open a terminal.
Enter sudo su
Then enter the password. In this way, the root user permission is obtained.
Then find the file (use commands in the terminal, of course, you can choose not to open a file manager .)
Execute./sh file name
You can.
For example, you have a sh file named 1.sh, which is in the/tmp directory of the hard disk. to execute this file, you must:
C code
$ Sudo su
Pass your password: (when you enter the password, you cannot see the entered information, but you have already entered it .)
# Cd/tmp
#./1.sh
$ Sudo su
Pass your password: (when you enter the password, you cannot see the entered information, but you have already entered it .)
# Cd/tmp
#./1. sh.
SH files are similar to batch files in Linux, so you may need to enter some information after running the sh file. This depends on the content of the sh file.
Method 2:
Sh xx. sh
Final suggestion: Use
C code: man sh to see sh introduction ~