how to run bash script linux code example Example 1: how to execute a bash script in terminal $ chmod +x fileName $ ./fileName Example 2: run sh file sh yourfile.sh