How To Execute SH File In Linux?

Open a terminal

Navigate to the directory containing the `.sh` file

Make the file executable with `chmod +x filename.sh`

Run the file with `./filename.sh`

Or run it with `sh filename.sh`

Or run it with `bash filename.sh`

If needed, use `sudo ./filename.sh` for administrator privileges

Suggested for You

Trending Today