I'm new to Ubuntu and know installing programs only from window. It is very easy there: Just double-click the setup.exe and the things start.

But how do I install a program on Ubuntu?

I want to install something which I couldn't find in the Ubuntu Software Center. I downloaded a .sh file and now I don't know what to do with it.

  • 1
    Thank you for your answer, but I want to install something which I couldn't find in the Ubuntu Software Center. I downloaded a .sh file and now I don't know what to do with it :) Oh my god, what a stupid question ;)
    – cberg
    Nov 8, 2011 at 19:52
  • 2
    general advice is not to install random stuff from the internet - its the quickest way to get into all sorts of trouble :)
    – fossfreedom
    Nov 8, 2011 at 20:01
  • 2
    it's no "random stuff from the internet" I want to install, it's just netbeans ;) I think I have to learn much :) Thank you for your help!
    – cberg
    Nov 8, 2011 at 20:07
  • 1
    ... also add what version of ubuntu you have installed - i've also found this question - does this help you? askubuntu.com/questions/21561/how-to-install-jdk-and-netbeans
    – fossfreedom
    Nov 8, 2011 at 20:12
  • 1

4 Answers 4


First you might need to give the .sh file permission to execute. chmod +x file.sh, then you can execute it with ./file.sh.

You can also right-click on the file, select Properties, then select Permissions and then select 'Allow executing file as program'. Then you double-click the file and select 'Run in Terminal' or 'Run'.


An .sh file in Ubuntu is pretty much the same as a .bat or .wsh file is in Windows. What the program does, or how it works, is completely up to the developer. It is not possible to answer "how to install an .sh-file", except to say "read the README".

It's poor practice to provide such programs. You should always look for .deb files, which is roughly comparable to .msi files in Windows, I believe. That is, you'll double click it, and it'll get installed.

  • 1
    It's why we're here. :) The key thing to understand is that this doesn't have anything to do with the operating system. It's about how the developers of an app chooses to make it available. Unfortunately, some companies are lazy when it comes to Linux. They think "oh, Linux users are experts, so we don't need to make our programs user friendly". They are wrong, because experts and geeks are the laziest people of them all. If anyone wants user-friendly, we do. The developers of NetBeans obviously do not care about Ubuntu. That will change very soon, or NetBeans will be forgotten. Nov 9, 2011 at 4:37

You can the file permission via the command line console in your Ubuntu.

Open a Terminal Window and type:

chmod 777 downloaded_file.sh

After you changed the file attribute, you can execute those file directly via terminal window or click it when you use file manager. Your installation file should be working now.

  • 3
    Better might be chmod +x downloaded_file.sh as this version doesn't give every user of the computer read and write access to that file. Feb 2, 2013 at 22:50

It is a shell script file, so you don't necessarily need execute permissions on it. You may run it in gnome-terminal using sh downloaded_file.sh. It works because it is just a text file, and sh interprets it line by line.

You must log in to answer this question.

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