write script from terminal in ubuntu code example Example: how to execute a bash script in terminal $ chmod +x fileName $ ./fileName