Saturday, October 27, 2012

Upgrading Ubuntu 12.04 LTS to 12.10


Ubuntu releases are made semi-annually by Canonical every year. Each Ubuntu release has a version number that consists of the year and month number of the release. For example, the latest release is Ubuntu 12.10 as it was released on 18 October 2012. Ubuntu releases are also given alliterative code names in an alphabeltical order, using an adjective and an animal as their naming scheme for a quick determination of which release is newer.

There are also two types of releases namely LTS (Long Term Support) and a non-LTS release. Every fourth release, in the second quarter of even-numbered years, has been designated as a Long Term Support (LTS) release. The LTS releases (for both Servers & Desktops releases) after 10.04 are supported to receive updates for five years. There is also a provision to avail paid technical support from Canonical Ltd. Earlier before 12.04 the desktop version of LTS releases were supported for only three years whereas server version of LTS releases have been supported for five years. The non-LTS releases (Servers & Desktops) have been typically supported for only 18 months. For example the Ubuntu 12.10 which is a non-LTS release will be supported till April, 2014. Upgrades between releases can be done from one release to the next release (e.g. Ubuntu 12.10 to Ubuntu 13.04) or from one LTS release to the next LTS release (e.g. Ubuntu 10.04 to 12.04). The below shown diagram from wikipedia shall give you a better explanation.

Version
Code name
Release date
Supported until
Desktop
Server
4.10 Warty Warthog 2004-10-20 2006-04-30
5.04 Hoary Hedgehog 2005-04-08 2006-10-31
5.10 Breezy Badger 2005-10-13 2007-04-13
6.06 LTS Dapper Drake 2006-06-01 2009-07-14 2011-06-01
6.10 Edgy Eft 2006-10-26 2008-04-25
7.04 Feisty Fawn 2007-04-19 2008-10-19
7.10 Gutsy Gibbon 2007-10-18 2009-04-18
8.04 LTS Hardy Heron 2008-04-24 2011-05-12 2013-04
8.10 Intrepid Ibex 2008-10-30 2010-04-30
9.04 Jaunty Jackalope 2009-04-23 2010-10-23
9.10 Karmic Koala 2009-10-29 2011-04-30
10.04 LTS Lucid Lynx 2010-04-29 2013-04 2015-04
10.10 Maverick Meerkat 2010-10-10 2012-04-10
11.04 Natty Narwhal 2011-04-28 2012-10-28
11.10 Oneiric Ocelot 2011-10-13 2013-04
12.04 LTS Precise Pangolin 2012-04-26 2017-04
12.10 Quantal Quetzal 2012-10-18 2014-04
13.04 Raring Ringtail 2013-04-18 2014-10
Color
Meaning
Red Release no longer supported
Green Release still supported
Blue Future release

LTS in simple terms means that the version will NOT receive any major new functional upgrades to our favorite packages but only “security updates” for three or five years depending on the version of LTS release. The primary reason for using an LTS release is that we can depend on it being updated regularly and therefore it is more secure and stable. It just means that we can guarantee a system for a long time. Applications wont be jumping to higher versions. This makes an LTS release a very solid deployment platform. Therefore users who are using a non-LTS release can still safely set the Update Manager to notify about the “LTS releases”.

Some think that the newest version of a software is more secure, but it is not true. Instead, the newer version may bring more features and hence more code that makes the operating system more vulnerable to bugs.

Since 12.04 is more stable and secure than later release because of it's LTS tag, I shall stick to it as I don't find any better reason to choose to upgrade to 12.10.

Well below are a few simple steps to upgrade from Ubuntu 12.04 to 12.10.

Open "Update Manager" and click "Settings" tab on the left bottom of the window.
In the "Updates" tab, go to the last menu "Notify me of a new Ubuntu version:" and select "For any new version".




Do not alter anything other than this unless you are sure about it. Once the changes are done you will be prompted for user password. After this close the "Software Sources" window and reopen the Update Manager. You will be prompted for an upgrade.




Click on "Upgrade" and the upgrade process will begin. This normally takes some time, so be patient.

Note: It is always a good idea to backup your important files before upgrading your operating system.

Friday, October 26, 2012

Updating Packages behind proxy server in Ubuntu


Most of us are aware of the proxy servers available at our work places. Sometimes they can make our lives almost horrible. Well here's a little guide to install updates on a Ubuntu machine located behind a proxy server.

Go to System Settings > Network > Network Proxy > Manual
and setup the proxy and the port.

Or we can also edit the /etc/apt/apt.conf file and add the below mentioned line to solve our problem.

$ sudo vi /etc/apt/apt.conf

Acquire::http::proxy “http://<username>:<password>@<proxy_ip>:<proxy_port>/”;

Save the file and your problem is solved.
Enjoy!!!

Wednesday, October 24, 2012

How to fix “Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)” error in Ubuntu


Somtimes it is just impossible to update your machine running Ubuntu. Recently I too faced the same issue. The error was as shown below.

$ sudo apt-get update
[sudo] password for baban:
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

As you can see the reason is quite obvious from the error itself. It means that another process is already using the mentioned directory which is necessary to install the application through any of the installation methods (like Synaptic Pacakge Manager, Update Manager, Ubuntu Software Center or it may be simply through terminal). So first we need to make sure that the 'Synaptic Package Manager' is not open. And if it is not then find out which application is being updated or installed and wait for it to finish. In case we need to find the process that is using that particular file, you can run the below mentioned command.


$ sudo fuser -vki /var/lib/apt/lists/lock

Or we can go directly for the below mentioned command to kill all the processes related to package updation.

$ sudo killall apt-get apt aptitude adept synaptic

Now if all the above solutions do not work which unfortunately was my case, we can run the below command finally to get rid of the error.

$ sudo rm /var/lib/apt/lists/* -vf

As you can see that I had removed all the locks that synaptic had acquired. After which I could run update successfully. It is not an ideal solution but worked perfectly for me and so will for you too.