Is there a difference between installing an application via Ubuntu Software Center or a terminal?

I would like to ask a very basic question but I have never thought about it before. Well, when someone installs an application from terminal, he has to add the repository first, right? On the other side, when someone installs an application from the Ubuntu Software Center, is the repository then added automatically?

I am asking those questions to figure out this: When I run update and then upgrade, will this application be upgraded or not? Is the result same in two options?


That is not really accurate, but not far off.

The Ubuntu Software Center is a set of repositories. Many, many applications are already in the repositories. To install those you do not need to add a new repository.

When one installs an application that has its own repository (virtualbox) and you want to use command line apt-get or the software center you need to have the repository added, key added and then update (apt-get update). There are also additional repositories that have large numbers of applications like playdeb which has many, many games in their repository.

After that you can install from a repository using either the GUI software center or command line apt-get install xxx

You can also install a .deb file using dpkg or other installs can be done using a binary installer or even just uncompressing the binary files.

Summary:

  • Not all applications have to be installed from a repository
  • Many thousands and applications are already in repositories pre-configured on initial install
  • You can add repositories and then use either GUI or command line to install applications from them
  • You can install programs that are not in repositories by using .deb files, binaries or compressed files
  • Applications installed from a repository will be, if possible, upgraded when you run the update and upgrade commands. One caveat is after a distribution upgrade 11.10 to 12.04 for example)... in that case you would need to re-add any repositories you have previously added.

The only really big difference between installing things from the Software Center or another gui and doing it from the command line is when things go wrong.

In most guis,installation error messages are hidden and they just give you a general message that it didn't work. When you do it from the command line, you see all the messages that are generated. Often, this information can be used to fix the problem or it will tell you why you probably don't want to fix it. E.g. installing the package would break or uninstall other packages that are already installed.

Sometimes, a package fails to install just because one of its dependencies is not installed (and the regular install doesn't automatically fix that like most do). When this happens, you can often just install the missing package first and then your install will succeed.

Also, apt-get will inform you of other associated packages that are "recommended" along with your package, so you can look them up and see if you want any of them.

It also reports on any packages that were installed previously that are probably not needed any more and tells you how to remove them.

You shouldn't add/delete packages from either of these last two steps without carefully reviewing the packages involved, but it's usually safe.

In Ubuntu 12.04, newly installed apps get added to the launcher by default, but this only happens for apps installed using the Software Center.