how to run a .sh file in ubuntu command line code example Example: how to run shell script chmod +x <fileName> ./fileName. # or use ->. bash fileName