Can't run .sh files in the terminal? [duplicate]

I used to run minecraft servers in 14.04 by either clicking the .sh file, and selecting run in terminal, or running the .jar file. I'm on 18.04 now, and I can't run the .sh file at all. Double clicking immediately opens up text editor, and dragging it to a terminal also opens the text editor. Trying to open the server.jar gives me a small window for half a second, which immediately closes. Has something changed, and does anyone know how to run .sh files now?

0

1 Answer

Have you allowed the file to be executed? Try to go to properties and find a checkbox with allow executable, check it. Try executing. This is the graphical way.
For terminal, just drag and drop in a terminal window and add ./ before it (for example: ./install.sh).

You Might Also Like