-2

I have setup file *.sh, I installed Ubuntu 14. I have tried terminal mode its not working. How to run GUI mode.

Please let me know the commands and any other samples

1
  • chmod +x /path/to/your/*.sh then sh /path/to/your/*.sh
    – Raphael
    Feb 11, 2016 at 18:27

1 Answer 1

0

To run a .sh file you need to open the terminal, then cd into the directory where the .sh file is located and then type this into the terminal:

chmod +x name-of-your-file.sh

then just

sh name-of-your-file.sh

The output of the command will appear on screen, if you have any other issue, let me know ! :)

2
  • There is no need for chmod +x if you want to execute script by running sh with the script name a an argument
    – techraf
    Feb 12, 2016 at 2:24
  • Using sh (which is the dash shell in Ubuntu) generically to run any shell script is not a good idea: it will fail if (for example) the script contains bash-specific features. It could even use a completely different shell such as csh. Feb 12, 2016 at 4:02

Not the answer you're looking for? Browse other questions tagged .