Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 '11 at 19:52
Oh, okay. I thought there would maybe be a way which I could go with all installations I will do in the future. – cberg Nov 8 '11 at 19:58
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 '11 at 20:01
... also add what version of ubuntu you have installed - i've also found this question - does this help you? – fossfreedom Nov 8 '11 at 20:12
up vote 49 down vote accepted

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

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'.

share|improve this answer

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.

share|improve this answer
That's good to know, thanks you! – cberg Nov 8 '11 at 20:21
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. – Jo-Erlend Schinstad Nov 9 '11 at 4:37

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

Open a Terminal Window and type:

chmod 777

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.

share|improve this answer
Better might be chmod +x as this version doesn't give every user of the computer read and write access to that file. – thirtythreeforty Feb 2 '13 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 It works because it is just a text file, and sh interprets it line by line.

share|improve this answer

protected by Community Feb 21 '14 at 0:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.