Application/ Software management in Ubuntu Gutsy
If you are very new to Ubuntu and have come from Windows where you got most updates by visiting the various vendors of each application and doing so separately; you are in for a shock! Updating your complete Ubuntu system including all the software is as simple as running the update manager. In this simple how-to you will learn how easy it is to install in various different ways and remove software as well.
Keeping your Ubuntu System up to Date:
Although you can use synaptic to install your updates, there is a dedicated tool provided by Ubuntu in the name and form of the “Update Manager” (located in System -> Administration -> Update Manager). It is very simple to use; once you start it, it will automatically download the list of updates available for your software. and shows them all neatly checked in a list. If your list is a bit old (it’s verified each day) you can make Ubuntu check for new updates by hitting “Check” and your list will be brought up to date. If you are curious and want to know a little bit more about the update(s) click “Show Details”.
Ubuntu checks for updates daily as mentioned above and notifies you when updates that are important come up. Run update manager by yourself once in a while to keep yourself covered.
Using Add/ Remove to manage software:
This is basically a graphical software manager tool. It is in the applications menu under the name of “Add/ Remove” even though it is actually an application itself name “gnome-app-install”. It allows you to select (or de-select) various packages all neatly arranged for you under different categories. When you launch Add/ Remove you are not prompted for a password; this is only needed when you have chosen your packages and have hit “Apply Changes”.
Along the left side you should see the list of categories in which the different applications will fall into. At the top, the “All” category will be selected by default. It lists every package that can be installed. The right side of the window is split in two with the upper section providing the application list and the lower one providing the selected application’s details. Just above the application list are the search and filter tools. The default filter will be set to “Supported Ubuntu Applications”; change that if you would like, I would recommend it; especially if you want to try a lot more than what supported applications have to offer.
Installing new software in Add/ Remove is very simple. You find the package and checking it’s box. Once you are happy with what you want to install hit apply and you will be asked by a dialog to enter your password so the changes can actually be made. All software currently installed will already be checked, and you can remove whatever you want by un-checking them, then clicking apply.
To find a specific application in the list, type something into the search bar at the top. I’ll remind you that the searches only look in the category you are currently in, so if you are in the “system Tools” category and search “Gimp” nothing will show up. The best place to do your searches is in the “All” category, that way Add/ Remove will scan through every category making sure you (hopefully) get what you want.
Using Synaptic Package Manager to manage software:
The Add/ Remove dialog works just fine for installing most applications, but if you want it more hardcore (library installations, reconfiguring things…) you will have to use Synaptic. You can run Synaptic by choosing it from: System -> Administration -> Synaptic Package manager.
On your first encounter or glance at Synaptic you might think it resembles Add/ Remove a tiny bit; in fact you are right. The left side has all the categories (but many more!), along the top right are the selection of all the packages for whatever category you are in and on the bottom right is the selected package’s info. In synaptic, to install or remove software, click on one of the boxes (to the left of the actual package’s name) and you’ll be presented with a menu with a variety of options:
- Unmark – If you’ve marked this package for installation, upgrade or one of it’s many options, this will remove that mark.
- Mark for Installation – Will add the package to the list of ones that will be installed
- Mark for Re-Installation – If you have some software that is currently installed, but it’s not working for some reason or another, this will remove it and start from scratch
- Mark for Upgrade – If your software has updates, this will download and install them
- Mark for Removal – This deletes the selected package from your system, but leaves it configuration file so if you ever decide to re-install the package, you will not have to reconfigure it
- Mark for Complete Removal – This deletes the selected package from your system and also removes the configuration files
After you have made your decisions, you can then hit “Apply” which will then have synaptic download, install, upgrade and remove as you have told it.
Located right under the Categories on the left side, you’ll see five buttons: “Sections, Status, Origin, Search Results and Custom Filters”. These modify the list to the left. Sections is the list view, Status shows you packages that are installed or have upgrades waiting for a package, Origin shows all your sources of packages, Search results stores your search results and custom has some grouping that’s only for really advanced users.
You can press Control+F or the Search icon at any time to locate a certain package by name. As mentioned already you can return to a search by going to the “Search Results” view then just click on the specific search to find it again.
While also giving you the method of installing and removing your applications/ software, synaptic can also let you configure servers that provide packages and let you find an install them. Synaptic lets you open up Debian universe and multi-verse.
Ubuntu is based on Debian Distribution which has around 25, 000 packages today (and growing!). Ubuntu only uses a few of those many packages, but makes it easy for you to unlock the many different packages awaiting your discovery. When using synaptic you should see small Ubuntu logos next to all the packages which certifies them as being officially supported. All other “non”-Ubuntu packages you will enable will not have this seal of approval but still be supported by Debian developers.
To enable this world of magic, open synaptic, then goto Settings -> Repositories. The list will show you all the servers you have configured (or they were default, either way…). All you need to do is check the Universe and Multi-Verse repositories in there and off you go.
Synaptic shows you an annoying message every time telling you the repository lists have changed and you have to reload the list. Click on the reload button on the top to do so. You should now see a whole lot of new packages at your disposal. However, now; only few have the official Ubuntu logo.
With so many things to install and so many ways to install them, it’s very easy to adapt to the the many ways. At the soul of every installation method they use the world renowned “Advanced Package Tool”. The power of APT is overwhelming. Join us apt users, nothing comes close!
Why is apt so cool? (It has Super Cow Powers!) It was the first to actually handle dependencies in applications/ software. Other distributions of Linux like Red-Hat used RPM files with dependencies. Example: An RPM for say the gimp will require the graphical tool kit (Gtk) which the gimp is based on. So If you tried installing the gimp RPM without the Gtk RPM it would fail miserably. So you take the Gtk RPM and try installing it…. Gtk has dependencies on three other things and so on and so on until you can’t find a certain RPM for one of the dependencies and you say that’s enough and leave in cursing frustration.
APT on the other hand is superior to RPM in every way, mainly because it is designed to retrieve your dependencies. So if you want Inkscape, it will retrieve all the dependencies as well as the package itself ensuring total simplicity. APT also includes installation resuming, which means if for some reason the install doesn’t complete, it will start where it left off next time.
To make sure APT will find packages quickly it uses local cache. Run this:
sudo apt-get update
The apt-get update command tells APT to find updates and download the latest files from it’s list of servers it’s configured to use. If your lists are old it takes around a minute to do, if not it finishes in a few seconds.
After you’ve run that command the latest package info will have been downloaded. Now you can instruct APT to auto download any software that’s been updated using this command:
sudo apt-get upgrade
If you have more software on your PC, there is a higher chance that something will be updated. Each run will tell important info on what is about to happen, example: 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
That is all you need to know about what’s going to happen right there. Remember, updates will overwrite the existing files replacing them with new ones so there is no real need to worry about how big the update(s) is/ are.
Remember that a simple apt-get upgrade will never remove or add new software, just update files or existing applications. It is safe and will never break things. Sometimes though you will see a variable in the “0 not upgraded” this is because some software must be installed or removed in order for the upgrade to succeed.
In an event as so you will need to use
sudo apt-get dist-upgrade
It allows you to upgrade from an older version of Ubuntu to a newer one (Such as Feisty to Gutsy). This will change things and remove obsolete items from the system whilst installing the latest features. This is one of my favorite commands as a new version of Ubuntu is released every 6 months, it allows you to upgrade without discs.
Apt-get upgrade and apt-get dist-upgrade are for bringing packages up to date,
sudo apt-get install
Will add new software. Example: say I want to install Wine; I would run:
sudo apt-get install wine
APT will find the dependencies I need for wine, list the dependencies you don’t already have and then ask for confirmation of installation.
There are sometimes suggested packages. Suggested packages don’t add any crucial features to an application, but you might need them for various things.
If you run an APT install on an existing installed package, APT will intercept your command as an apt-get update to see whether newer versions are available for you.
The next package operation is of course removing using APT. It will remove things you do not want. This is done by the apt-get remove command. Example as follows:
sudo apt-get remove audacity
Removing packages can sometimes have effects you won’t want. APT will also remove any software that depends on it. An example right here, (you would never do this since libgtk is the graphical toolkit for Ubuntu) if you did this APT would insist dragging another 100 or so packages along with it. Always read the APT report before pressing “y”.
A normal apt-get remove will leave behind the config files so that if you want it again you will not have to reconfigure it to your liking. If you want the config files deleted as well you would do as the following example: (same as the “mark for complete removal” in synaptic)
sudo apt-get remove --purge audacity
That will completely remove audacity (or whatever you want).
Finding Things in APT:
Packages and packages and packages oh my! With the huge number of software available to you, (even more after enabling the universe and multi-verse repositories) it might be a bit hard finding a certain package. The tool to find packages is called apt-cache and is used as so:
apt-cache search cd
Sometimes a search will have hundreds; even thousands of entries. (such as the one above) Apt-cache will also look in the description if you do not tell it otherwise. To make APT search in just the title of the package you would do:
apt-cache -n search cd
The instruct being -n. This has shortened my search a bit. Another way to shorten searches and get what you are looking for easier are expressions. Here are two basic ones: ^ means start and $ means end. Say I wanted to find packages that start with cd (like cdextractor, cdtool or cdcover), I would do this:
apt-cache -n search ^cd
Wow! Alot smaller now that I have told it I wanted the name to start with cd and I want it only to look in the name of the package. Another way to search (and probably the most popular) is to combine apt-cache with grep like so:
apt-cache search burn | grep cd
Now I’ve found all cd burning apps. Once you have found what you are looking for just run an apt-get install or if you want some more info on the package you can use apt-cache showpkg like:
apt-cache showpkg cdcover
This will show all the info of the package such as dependencies etc… Quite useful.
Compiling is fun and easy, (for me) most source code is in the tarball format; tar files if you will. Those files have been compressed using either bzip or gzip. They normally de-compress into a directory holding several files. I think it’s best to compile code as a normal user as not to harm your system if there is malicious code (and there is sometimes unfortunately), so create a directory in your home folder or some other place to which you will uncompress files. (Mine’s named just simply “code”)
Uncompress your tarballs into the folder using the -c option as follows (and replacing “code” with the name of your directory):
tar zxvf nameoffile.tgz -C ~/code
tar zxvf nameoffile.tar.gz -C ~/code
tar jxvf nameoffile.bz -C ~/code
tar jxvf nameoffile.tar.b2z -C ~/code
If you don’t know the compression method that has been used you can use the file command:
Now change directories to ~/code/nameoffile (with cd). It is also recommended you go to the directory in Nautilus and look for a “README” or “INSTALL” file, because the software might require you to do things in a specific manner. Normally you would compile the source code like this:
This will run a script to see whether or not all the dependencies are correct and your build environment are right. If you are missing dependencies the script should tell you the ones you are missing and what it needs.
When the configure script is finished (has completed correctly), run this:
Make will do the initial compiling of your software. To finish it of and install your software run:
sudo make install
If the compilation doesn’t succeed check the errors and run:
before you restart. To remove the software if you don’t need/ want/ like it simply run:
sudo make uninstall
That’s about it. This guide was written by me a while ago and was originally written for Ubuntuforums. I hope you enjoy and learn more if you are already an experienced Linux user. If you have questions or have spotted an error, please tell me in the comments.