<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unix Tutorial &#187; Ubuntu</title>
	<atom:link href="http://www.unixtutorial.org/category/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unixtutorial.org</link>
	<description>Learn UNIX</description>
	<lastBuildDate>Wed, 03 Mar 2010 22:55:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ubuntu SSH: How To Enable Secure Shell in Ubuntu</title>
		<link>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/</link>
		<comments>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/#comments</comments>
		<pubDate>Fri, 15 May 2009 15:38:54 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh server]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=566</guid>
		<description><![CDATA[SSH (Secure SHell) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port [...]]]></description>
			<content:encoded><![CDATA[<p><strong>SSH </strong>(<strong>Secure SHell</strong>) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port redirections. Today I'm going to show you how to get started with SSH in <strong>Ubuntu</strong>.</p>
<h3>Installing SSH server in Ubuntu</h3>
<p>By default, your system will have no SSH service enabled, which means you won't be able to connect to it remotely using SSH protocol (TCP port 22). This means that installing SSH server will be one of the first post-install steps on your system.</p>
<p>The most common SSH implementation is <a href="http://www.openssh.org"><strong>OpenSSH</strong></a> server, and that's exactly what you want to install.</p>
<p>Log in with your standard username and password, and run the following command to install openssh-server. You should be using the same username that you specified when installing Ubuntu, as it will be the only account with sudo privileges to run commands as root:</p>
<pre>ubuntu$ <strong>sudo apt-get install openssh-server
</strong>[sudo] password for greys:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  openssh-server
0 upgraded, 1 newly installed, 0 to remove and 75 not upgraded.
Need to get 285kB of archives.
After this operation, 782kB of additional disk space will be used.
Get:1 http://ie.archive.ubuntu.com jaunty/main openssh-server 1:5.1p1-5ubuntu1 [
285kB]
Fetched 285kB in 0s (345kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 101998 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-5ubuntu1_i386.deb) .
..
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-5ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Restarting OpenBSD Secure Shell server sshd                           [ OK ]</pre>
<h3>Verifying your SSH server works</h3>
<p>While you're still on your local desktop session, you can use the ps command to confirm that SSH daemon (<strong>sshd</strong>) is running:</p>
<pre>ubuntu$ <strong>ps -aef | grep sshd
</strong>root     24114     1  0 15:18 ?        00:00:00 /usr/sbin/sshd</pre>
<p>Now that you see it's there, it's time to try connecting:</p>
<pre>ubuntu$ <strong>ssh localhost</strong></pre>
<p>Since this is the first time you're trying to connect using SSH, you'll have to answer yes to the following question:</p>
<pre>The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 18:4d:96:b3:0d:25:00:c8:a1:a3:84:5c:9f:1c:0d:a5.
Are you sure you want to continue connecting (yes/no)? yes</pre>
<p>&#8230; you'll then be prompted for your own password (remember, the system treats such connection request as if you were connecting remotely, so it can't trust you without confirming your password):</p>
<pre>Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
greys@localhost's password:</pre>
<p>.. and finally you'll see the usual Ubuntu (Jaunty in this example) banner and prompt:</p>
<pre>Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:

http://help.ubuntu.com/

Last login: Fri May 15 15:18:34 2009 from ubuntu
ubuntu$</pre>
<p>That's it, providing you have your networking configured and you know your IP address or hostname, you can start connecting to your Ubuntu box from remote systems, using the same command.  Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a href="http://www.unixtutorial.org/commands">Unix commands</a></strong></li>
<li><strong><a title="apt-get behind proxy" href="http://www.unixtutorial.org/2007/09/how-to-use-apt-get-behind-proxy/">Using apt-get behind proxy</a></strong></li>
<li><strong><a title="list packages in Ubuntu" href="http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/">List installed packages in Ubuntu</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Confirm if Your CPU is 32bit or 64bit</title>
		<link>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/</link>
		<comments>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/#comments</comments>
		<pubDate>Fri, 08 May 2009 08:03:49 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[cpuinfo]]></category>
		<category><![CDATA[uname]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=549</guid>
		<description><![CDATA[I had to download a piece of software today for one of the servers which I haven't used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on Unix Tutorial. Some of you probably remember the uname command which also shows you [...]]]></description>
			<content:encoded><![CDATA[<p>I had to download a piece of software today for one of the servers which I haven't used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on <a title="Unix Tutorials" href="http://www.unixtutorial.org"><strong>Unix Tutorial</strong></a>.</p>
<p>Some of you probably remember the <a title="uname command" href="http://www.unixtutorial.org/uname"><strong>uname command</strong></a> which also shows you similar information, but <strong>uname </strong>confirms the running kernel of your OS and not the CPU capability: if you're booted into 32bit mode, it will not help you to recognize the 64bit potential of your system.</p>
<h3>Obtaining CPU information from /proc/cpuinfo</h3>
<p>Most Linux distros will have the special <strong>/proc/cpuinfo</strong> file which contains a textual description of all the features your processors have. This is a very useful file &#8211; depending on your task it may help you identify any features of your processors, as well as confirm the overall number of CPUs your system has installed.</p>
<p>Most commonly, the following information is obtained from <strong>/proc/cpuinfo</strong>:</p>
<ul>
<li>processor model name and type</li>
<li>processor speed in Mhz</li>
<li>processor cache size</li>
<li>instruction flags supported by CPU</li>
</ul>
<p>Here's how the typical output will look:</p>
<pre>processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :                   Intel(R) Xeon(TM) CPU 3.20GHz
stepping        : 3
cpu MHz         : 3192.320
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts
acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6388.78
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:</pre>
<p>The same block of information will be shown for each CPU visible to your system. There will be 2 processor instances for each physical CPU if hyper-treading is enabled, and there will be 2 or 4 processor entries for each physical CPU on dual- and quad-core systems configurations.</p>
<h3>How to confirm the 64bit capability of your CPU in Linux</h3>
<p>Based on<strong> /proc/cpuinfo</strong> file, it is quite easy to confirm whether your CPU is capable of 64bit or not. All you have to do is look at the flags which tell you what instruction sets your CPU is capable of.</p>
<p>All  the CPUs on your system will have the same type and therefore support the same instruction sets, that's why in this example the grep command returns 4 similar lines &#8211; for the 4 CPU instances found on my system:</p>
<pre>newserver# <strong>grep flags /proc/cpuinfo</strong>
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr</pre>
<p>What you're looking for is the following flag: <strong>lm</strong>. It stands for <strong>X86_FEATURE_LM</strong>, the Long Mode (64bit) support. If you can find the "<strong>lm</strong>" flag among your CPU flags, this means you're looking at a 64bit capable processor.</p>
<p>As you can see from the example about, the processors in question are 64bit capable.</p>
<p>And this is how <strong>/proc/cpuinfo</strong> will look on an older system with only 32bit capable CPUs, there's no lm flag as you can see:</p>
<pre>oldserver# <strong>grep flags /proc/cpuinfo</strong>
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm</pre>
<p>That's it, hope this little tip helps you next time you're puzzled about your CPU capabilities!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="32bit deb on 64bit system" href="http://www.unixtutorial.org/2008/03/install-32-bit-deb-packages-on-64-bit/">How to install and run 32bit packages on 64bit Debian system</a></strong></li>
<li><strong><a title="uname - useful information about your Unix system" href="http://www.unixtutorial.org/commands/uname/">Confirming whether you're using a 64bit OS</a></strong></li>
<li><strong><a title="Unix Glossary" href="http://www.unixtutorial.org/glossary">Unix Glossary</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How To Change Ownership of Files and Directories in Unix</title>
		<link>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/</link>
		<comments>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:21:13 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[file ownership]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=439</guid>
		<description><![CDATA[I've just been asked a question about changing the ownership of files from one Unix user to another, and thought it probably makes sense to have a quick post on it. File ownership in Unix Just to give you a quick reminder, I'd like to confirm that every single file in Unix belongs to some [...]]]></description>
			<content:encoded><![CDATA[<p>I've just been asked a question about changing the ownership of files from one Unix user to another, and thought it probably makes sense to have a quick post on it.</p>
<h3>File ownership in Unix</h3>
<p>Just to give you a quick reminder, I'd like to confirm that every single file in Unix belongs to some user and some group. There simply isn't a way to create a file without assigning ownership. I've briefly touched the topic of <a title="find the owner of a file" href="http://www.unixtutorial.org/2008/03/how-to-find-the-owner-of-a-file-in-unix/">confirming file ownership in Unix</a> before, so today I will simply build on that and show you how to change ownership of files.</p>
<p>Here's a setup for today: I have created a temporary directory with a few files and made myself the owner of all the files:</p>
<pre>ubuntu$ <strong>ls -al /home/greys/example/</strong>
total 12
drwxr-xr-x  3 greys admin 4096 Feb  9 03:55 .
drwxr-xr-x 13 greys greys 4096 Feb  9 03:54 ..
drwxr-xr-x  2 greys admin 4096 Feb  9 03:55 dir1
-rw-r--r--  1 greys admin    0 Feb  9 03:54 file1
-rw-r--r--  1 greys admin    0 Feb  9 03:55 file2</pre>
<p>As you can see from this listing, the owner (third field in each line) is my username &#8211; <strong>greys</strong>. The next field is a Unix group of each file's owner &#8211; <strong>admin </strong>in my example.</p>
<h3>Changing owner of a file in Unix</h3>
<p>Changing file ownership means only updating the association between a Unix user and a file, and nothing else. When you're changing the owner of a file, no data contained in a file is changed.</p>
<p>To change the owner of a file, you need to use the <strong>chown command</strong> (easy enough to remember: CHange OWNer &#8211; <strong>chown</strong>), with the following syntax:</p>
<pre>ubuntu$ <strong>chown nobody file1</strong></pre>
<p>In this command, <strong>nobody </strong>is the username of the new owner for a list of files. In my example, the only file we'd like to change ownership for is <strong>file1</strong>.</p>
<p>It is important to realize that you can only change file ownership as a super-user (root). Any regular Unix user cannot change the ownership of any file, and I'd like to explain why.</p>
<p>Indeed, some people are surprised: if I'm the owner of a given file, why can't I change the ownership for it? That's because transferring the ownership will mean some other Unix user will become the owner of the file(s) in question. So changing ownership is like making a decision not only for yourself, but for the new owner of the files.This is only something a super-user &#8211; special administrative account in Unix &#8211; can do.</p>
<p>The same logic applies to other people not being able to become owners of your files, even if they're willing to assume the new responsibilities of owning files. They cannot revoke your ownership, because each Unix user is only allowed to make decisions and take actions on his/her own behalf.</p>
<p>That's why you will probably see an error like this if you attempt to change ownership of a file as your own regular Unix user:</p>
<pre>ubuntu$ <strong>id</strong>
uid=1000(greys) gid=113(admin) groups=33(www-data),113(admin)
ubuntu$ <strong>chown nobody file1</strong>
chown: changing ownership of `file1': Operation not permitted</pre>
<p>But if we become root:</p>
<pre>ubuntu$ <strong>sudo -i</strong>
[sudo] password for greys:
ubuntu#</pre>
<p>&#8230; we'll have no problem changing owners for any files:</p>
<pre>ubuntu# <strong>cd /home/greys/example</strong>
ubuntu# <strong>chown nobody file1</strong>
ubuntu# <strong>ls -l file1</strong>
-rw-r--r-- 1 nobody admin 0 Feb  9 03:54 file1</pre>
<h3>Changing owner for multiple files</h3>
<p>If you're going to change owner of a few files, this can easily be done using either a full list of files or a mask.</p>
<p>First, here's an example of updating ownership for a specified list of files (and as you can see, directories as well):</p>
<pre>ubuntu# <strong>chown nobody file2 dir1</strong>
ubuntu# <strong>ls -al</strong>
total 12
drwxr-xr-x  3 greys  admin 4096 Feb  9 03:55 .
drwxr-xr-x 13 greys  greys 4096 Feb  9 03:54 ..
drwxr-xr-x  2 nobody admin 4096 Feb  9 03:55 dir1
-rw-r--r--  1 nobody admin    0 Feb  9 03:54 file1
-rw-r--r--  1 nobody admin    0 Feb  9 03:55 file2</pre>
<p><strong>IMPORTANT:</strong> here's one thing which is often forgotten: when you're changing an owner of a directory, this DOES NOT automatically change owner of all the files which already exist in this directory. So, if we check the file3 in dir1 after the example above, we can see that even though dir1 now belongs to user nobody, file3 in it still belongs to me:</p>
<pre>ubuntu# <strong>ls -l dir1/file3</strong>
-rw-r--r-- 1 greys admin 0 Feb  9 03:55 dir1/file3</pre>
<p>If your intention is to change ownership of all the files and directories of a certain location in your filesystem, you need to use a <strong>-R</strong> option of the <strong>chown command</strong>, which means recursive ownership change:</p>
<pre>ubuntu# <strong>chown -R nobody dir1</strong>
ubuntu# <strong>ls -l dir1/file3</strong>
-rw-r--r-- 1 nobody admin 0 Feb  9 03:55 dir1/file3</pre>
<p>And just to further demonstrate this, I'm going to change owner of all the files and directories in <strong>/home/greys/example</strong> directory back to my own username, <strong>greys</strong>:</p>
<pre>ubuntu# chown -R greys /home/greys/example/
ubuntu# ls -l /home/greys/example/
total 4
drwxr-xr-x 2 greys admin 4096 Feb  9 03:55 dir1
-rw-r--r-- 1 greys admin    0 Feb  9 03:54 file1
-rw-r--r-- 1 greys admin    0 Feb  9 03:55 file2</pre>
<p>That's it for today, good luck with changing file owners on your Unix system!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="Owner of a file in Unix" href="http://www.unixtutorial.org/2008/03/how-to-find-the-owner-of-a-file-in-unix/">Finding the owner of a file in Unix</a></strong></li>
<li><strong><a title="find files of a certain user" href="http://www.unixtutorial.org/2008/06/find-files-which-belong-to-a-user-or-unix-group/">Find files which belong to a given Unix user</a></strong></li>
<li><strong><a title="user id instead of username" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">What to do when numeric user id is shown instead of username</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/02/how-to-change-ownership-of-files-and-directories-in-unix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu Upgrade: From Hardy Heron to Intrepid Ibex</title>
		<link>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/</link>
		<comments>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 13:44:03 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Advanced topics]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=401</guid>
		<description><![CDATA[I've been upgrading Ubuntu installations quite a few times recently, and thought it makes sense to post a really short how-to if you ever want to upgrade your Ubuntu distro from the command line. Use apt-get to upgrade Ubuntu The procedure for upgrading one Ubuntu release to another one is pretty straightforward. There are some [...]]]></description>
			<content:encoded><![CDATA[<p>I've been upgrading Ubuntu installations quite a few times recently, and thought it makes sense to post a really short how-to if you ever want to upgrade your Ubuntu distro from the command line.</p>
<h3>Use apt-get to upgrade Ubuntu</h3>
<p>The procedure for upgrading one Ubuntu release to another one is pretty straightforward. There are some rules though:</p>
<ol>
<li>Never attempt to skip a release or two when upgrading</li>
<li>Never do a few Ubuntu release upgrades in a row without reboots in between</li>
<li>Always backup the files you change</li>
<li>Always have an install CD for your current Ubuntu release around</li>
</ol>
<h3>Upgrading Ubuntu: step by step procedure</h3>
<p>There are a few steps involved in every Ubuntu upgrade:</p>
<h4>1. Confirm your existing Ubuntu release <strong></strong></h4>
<p><strong>/etc/lsb-release</strong> file will help you determine the current <a title="Ubuntu releases" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/">Ubuntu release</a> you have. In my example, that's what it was:</p>
<pre>ubuntu# <strong>cat /etc/lsb-release</strong>
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"</pre>
<h4>2. Change the /etc/apt/sources.list file</h4>
<p>This is the file which holds a list of all the repositories to be used by <strong>apt-get command</strong> (and the rest of the apt commands) to manage packages on your Ubuntu system. It usually looks like this (note how I use grep to ignore the comment lines in the file thus only showing the content that's of interest to us):</p>
<pre>ubuntu# <strong>cat /etc/apt/sources.list | grep -v ^#</strong>
deb http://ie.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://ie.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy universe
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://ie.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://ie.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
...</pre>
<p>Each line contains a URL of a certain repository and then the <a title="Ubuntu codenames" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/"><strong>Ubuntu release codename</strong></a> and a type of the repository. Without going into details today, I'll just concentrate on the release codename: "<strong>hardy</strong>" in this example.</p>
<p>What these commands do is confirm that for any updates apt-get should be consulting the specified repositories. In order to upgrade your distribution, we need to change the Ubuntu release codename to the one of the next release &#8211; for Intrepid Ibex (Ubuntu 8.10) it's "<strong>intrepid</strong>".</p>
<p>First, make a copy of the existing <strong>/etc/apt/sources.list</strong>, and then use sed to generate a new file with <strong>hardy </strong>replaced by <strong>intrepid</strong>:</p>
<pre>ubuntu# <strong>cp /etc /apt/apt/sources.list /etc/apt/sources.list.hardy</strong>
ubuntu# <strong>cat /etc/apt/sources.list.hardy | grep -v ^#</strong>
ubuntu# <strong>cat /etc/apt/sources.list.hardy | sed s/hardy/intrepid/g &gt; /etc/apt/sources.list</strong></pre>
<h4>3. Use apt-get update command to update the packages list</h4>
<p>Now that we have specified the Intrepid Ibex release codename in <strong>/etc/apt/sources.list</strong>, it's time to make apt-get recognize this by contacting all the repositories mentioned in the file and downloading lists of new packages available from all of them. apt-get maintains  a list of available packages in its own database, and that's how yout get it to refresh:</p>
<pre>ubuntu# <strong>apt-get update</strong>
0% [Working]

Get:1 http://security.ubuntu.com intrepid-security Release.gpg [189B]
Ign http://security.ubuntu.com intrepid-security/main Translation-en_IE
Ign http://security.ubuntu.com intrepid-security/restricted Translation-en_IE
Get:2 http://ie.archive.ubuntu.com intrepid Release.gpg [189B]
...</pre>
<p>It's going to be quite a long list of newly downloaded lists from all the repositories.</p>
<h4>4. Use apt-get dist-upgrade to upgrade your Ubuntu release</h4>
<p>We're now ready to upgrade your Ubuntu, it will take just one more command and a few hundred megabytes of a download. Once you see this output, simply answer "y" to the question and leave your Ubuntu alone for about an hour to complete the downloads and update all the packages:</p>
<pre>ubuntu# <strong>apt-get updatedist-upgrade</strong>
Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done

Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree       

Reading state information... 0%
Reading state information... 10%
Reading state information... Done

Calculating upgrade... Done

The following packages will be REMOVED:
  console-tools gimp-gnomevfs gimp-python gtk2-engines-ubuntulooks gtkhtml3.14 libchromexvmc1 libchromexvmcpro1
  libffi4 libgail-common libgail18 libgmime-2.0-2 libgnomekbd2 libgnomekbdui2 libperl5.8 myspell-en-us
  xserver-xorg-video-cyrix xserver-xorg-video-imstt xserver-xorg-video-newport xserver-xorg-video-psb
  xserver-xorg-video-via
The following NEW packages will be installed:
  bluetooth bluez compiz-wrapper cpp-4.3 cups cups-bsd cups-client cups-common cups-driver-gutenprint
  firefox-3.0-branding gcc-4.3 gcc-4.3-base gdm-guest-session gstreamer0.10-schroedinger guile-1.8-libs gvfs-bin
  hunspell-en-us kbd landscape-common libapparmor-perl libapparmor1 libasound2-plugins libavahi-gobject0
  libbabl-0.0-0 libbind9-40 libbluetooth3 libcamel1.2-14 libcanberra-gnome libcanberra-gtk0 libcanberra0 libcap2
  libcryptui0 libcups2 libdb4.7 libdjvulibre21 libdns43 libebackend1.2-0 libedataserver1.2-11 libelf1 libept0
  libffi5 libgdiplus libgegl-0.0-0 libgif4 libglitz-glx1 libglitz1 libgmime-2.0-2a libgmp3c2 libgnome-desktop-2-7
  libgnome-keyring1.0-cil libgnomekbd3 libgnomekbdui3 libgnutls26 libgp11-0 libgpm2 libgtkglext1
  libgtkhtml-editor-common libgtkhtml-editor0 libgucharmap7 libhunspell-1.2-0 libhyphen0 libijs-0.35 libilmbase6
  libisc44 libisccc40 libisccfg40 libltdl7 liblwres40 libmldbm-perl libmpfr1ldbl libmtp8 libntfs-3g28 libopenal1
  libopenexr6 libpam-ck-connector libpangomm-1.4-1 libparted1.8-9 libpci3 libpciaccess0 libpcsclite1 libperl5.10
  libpoppler-glib3 libpoppler3 libschroedinger-1.0-0 libsilc-1.1-2 libsmbios2 libspectre1 libspeexdsp1 libtalloc1
  libtotem-plparser12 libts-0.0-0 libuuid-perl libv4l-0 libwbclient0 libxapian15 libxcb-render-util0
  libxcb-render0 linux-firmware linux-headers-2.6.27-9 linux-headers-2.6.27-9-generic
  linux-image-2.6.27-9-generic linux-restricted-modules-2.6.27-9-generic myspell-en-au openoffice.org-math
  openssl-blacklist python-cupshelpers python-pexpect python-pkg-resources python-pycurl python-rdflib
  python-smartpm python-twisted-bin python-twisted-core python-twisted-web python-usb python-xkit
  python-zopeinterface syslinux sysvinit-utils ubuntu-system-service update-motd usb-creator xinput
  xserver-common xserver-xorg-video-mach64 xserver-xorg-video-r128 xserver-xorg-video-radeon
The following packages have been kept back:
  ubuntu-desktop
The following packages will be upgraded:
  acl acpi acpi-support acpid adduser alacarte alsa-base alsa-utils anacron apmd app-install-data
  app-install-data-commercial apparmor apparmor-utils apport apport-gtk apt apt-utils aptitude apturl aspell at
  at-spi avahi-autoipd avahi-daemon base-files base-passwd bash bash-completion belocs-locales-bin bind9-host
  binutils binutils-static bluez-cups bluez-gnome bluez-utils bogofilter bogofilter-bdb bogofilter-common brasero
  brltty brltty-x11 bsdutils bug-buddy busybox-initramfs bzip2 ca-certificates capplets-data cdparanoia cdrdao
  cli-common command-not-found command-not-found-data compiz compiz-core compiz-fusion-plugins-extra
  compiz-fusion-plugins-main compiz-gnome compiz-plugins compizconfig-backend-gconf console-setup
  console-terminus consolekit contact-lookup-applet coreutils cpio cpp cpp-4.2 cron cups-pdf cupsddk
  cupsddk-drivers cupsys cupsys-bsd cupsys-client cupsys-common cupsys-driver-gutenprint dash dbus dbus-x11
  debconf debconf-i18n debianutils defoma deskbar-applet desktop-file-utils dhcp3-client dhcp3-common
  dictionaries-common dnsutils doc-base dosfstools dpkg dvd+rw-tools e2fslibs e2fsprogs eject ekiga eog
  esound-common espeak espeak-data ethtool evince evolution evolution-common evolution-data-server
  evolution-data-server-common evolution-exchange evolution-plugins evolution-webcal example-content f-spot
  fast-user-switch-applet fdutils file file-roller findutils finger firefox firefox-3.0 firefox-3.0-gnome-support
  firefox-gnome-support fontconfig fontconfig-config foo2zjs foomatic-db foomatic-db-engine foomatic-db-hpijs
  foomatic-filters fortune-mod fortunes-min freeglut3 friendly-recovery ftp fuse-utils gcalctool gcc gcc-4.2
  gcc-4.2-base gconf-editor gconf2 gconf2-common gdb gdebi gdebi-core gdm gedit gedit-common genisoimage
  gettext-base ghostscript ghostscript-x gimp gimp-data gimp-help-common gimp-help-en gnome-about
  gnome-accessibility-themes gnome-app-install gnome-applets gnome-applets-data gnome-cards-data
  gnome-control-center gnome-desktop-data gnome-doc-utils gnome-games gnome-games-data gnome-icon-theme
  gnome-keyring gnome-mag gnome-media gnome-media-common gnome-menus gnome-mount gnome-netstatus-applet
  gnome-nettool gnome-orca gnome-panel gnome-panel-data gnome-pilot gnome-pilot-conduits gnome-power-manager
  gnome-screensaver gnome-session gnome-settings-daemon gnome-spell gnome-system-monitor gnome-system-tools
  gnome-terminal gnome-terminal-data gnome-themes gnome-user-guide gnome-utils gnome-volume-manager gnupg gpgv
  grep groff-base grub gsfonts gstreamer0.10-alsa gstreamer0.10-gnomevfs gstreamer0.10-plugins-base
  gstreamer0.10-plugins-base-apps gstreamer0.10-plugins-good gstreamer0.10-pulseaudio gstreamer0.10-tools
  gstreamer0.10-x gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf gucharmap guile-1.6-libs gvfs
  gvfs-backends gvfs-fuse gzip hal hal-cups-utils hal-info hdparm hostname hotkey-setup hpijs hplip hplip-data
  human-icon-theme human-theme ifupdown initramfs-tools initscripts iproute iptables iso-codes jockey-common
  jockey-gtk klibc-utils klogd landscape-client language-pack-en language-pack-en-base language-pack-gnome-en
  language-pack-gnome-en-base language-selector language-selector-common language-support-en
  language-support-translations-en language-support-writing-en laptop-detect laptop-mode-tools
  launchpad-integration lftp libaa1 libacl1 libalut0 libao2 libapm1 libarchive1 libart-2.0-2 libart2.0-cil
  libasound2 libaspell15 libatk1.0-0 libatm1 libatspi1.0-0 libattr1 libavahi-client3 libavahi-common-data
  libavahi-common3 libavahi-compat-libdnssd1 libavahi-core5 libavahi-glib1 libavahi-ui0 libbeagle1 libblkid1
  libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libbrlapi0.5 libbz2-1.0 libc6 libc6-i686
  libcaca0 libcairo-perl libcairo2 libcairomm-1.0-1 libcdio-cdda0 libcdio-paranoia0 libcdio7 libcdparanoia0
  libck-connector0 libcomerr2 libcompizconfig0 libconsole libcroco3 libcucul0 libcupsimage2 libcupsys2 libcurl3
  libcurl3-gnutls libcwidget3 libdaemon0 libdatrie0 libdb4.6 libdbus-1-3 libdbus-glib-1-2 libdecoration0
  libdeskbar-tracker libdevmapper1.02.1 libdirectfb-1.0-0 libdmx1 libdrm2 libdv4 libebook1.2-9 libecal1.2-7
  libedata-book1.2-2 libedata-cal1.2-6 libedataserverui1.2-8 libedit2 libeel2-2 libeel2-data libegroupwise1.2-13
  libelfg0 libenchant1c2a libesd-alsa0 libespeak1 libexchange-storage1.2-3 libexempi3 libexif12 libexpat1
  libflac8 libfontconfig1 libfontenc1 libfreetype6 libfs6 libfuse2 libgadu3 libgail-gnome-module libgcc1
  libgconf2-4 libgconf2.0-cil libgcrypt11 libgd2-noxpm libgdata-google1.2-1 libgdata1.2-1 libggz2 libggzcore9
  libggzmod4 libgimp2.0 libgksu2-0 libgl1-mesa-dri libgl1-mesa-glx libglade2-0 libglade2.0-cil libglib-perl
  libglib2.0-0 libglib2.0-cil libglibmm-2.4-1c2a libglu1-mesa libgmime2.2-cil libgnome-keyring0 libgnome-mag2
  libgnome-media0 libgnome-menu2 libgnome-pilot2 libgnome-speech7 libgnome-vfs2.0-cil libgnome-window-settings1
  libgnome2-0 libgnome2-canvas-perl libgnome2-common libgnome2-perl libgnome2-vfs-perl libgnome2.0-cil
  libgnomecanvas2-0 libgnomecanvas2-common libgnomecups1.0-1 libgnomekbd-common libgnomeprint2.2-0
  libgnomeprint2.2-data libgnomeprintui2.2-0 libgnomeprintui2.2-common libgnomeui-0 libgnomeui-common
  libgnomevfs2-0 libgnomevfs2-bin libgnomevfs2-common libgnomevfs2-extra libgomp1 libgpgme11 libgphoto2-2
  libgphoto2-port0 libgpod-common libgpod3 libgraphviz4 libgs8 libgsf-1-114 libgsf-1-common libgsl0ldbl
  libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libgtk-vnc-1.0-0 libgtk2-perl libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-cil libgtk2.0-common libgtkhtml2-0 libgtkhtml3.14-19 libgtkhtml3.16-cil libgtkmm-2.4-1c2a
  libgtksourceview2.0-0 libgtksourceview2.0-common libgtkspell0 libgtop2-7 libgtop2-common libguile-ltdl-1
  libgutenprint2 libgvfscommon0 libgweather-common libgweather1 libhal-storage1 libhal1 libhesiod0
  libhtml-parser-perl libhtml-tagset-perl libicu38 libidn11 libieee1284-3 libjasper1 libkeyutils1 libklibc
  libkpathsea4 libkrb53 liblaunchpad-integration1 liblcms1 libldap-2.4-2 liblircclient0 liblocale-gettext-perl
  liblpint-bonobo0 liblzo2-2 libmagic1 libmagick10 libmetacity0 libmono-addins-gui0.2-cil libmono-addins0.2-cil
  libmono-cairo1.0-cil libmono-cairo2.0-cil libmono-corlib1.0-cil libmono-corlib2.0-cil libmono-data-tds1.0-cil
  libmono-data-tds2.0-cil libmono-security1.0-cil libmono-security2.0-cil libmono-sharpzip0.84-cil
  libmono-sharpzip2.84-cil libmono-sqlite2.0-cil libmono-system-data1.0-cil libmono-system-data2.0-cil
  libmono-system-web1.0-cil libmono-system-web2.0-cil libmono-system1.0-cil libmono-system2.0-cil libmono0
  libmono1.0-cil libmono2.0-cil libmusicbrainz4c2a libnautilus-burn4 libnautilus-extension1 libneon27
  libnet-dbus-perl libnewt0.52 libnl1 libnm-glib0 libnm-util0 libnspr4-0d libnss3-1d libogg0 liboil0.3
  liboobs-1-4 libopal-2.2 libopenobex1 liborbit2 libotr2 libpam-gnome-keyring libpam-modules libpam-runtime
  libpam0g libpanel-applet2-0 libpango1.0-0 libpango1.0-common libpaper-utils libpaper1 libpcap0.8 libpcre3
  libpisock9 libpisync1 libpixman-1-0 libpng12-0 libpolkit-dbus2 libpolkit-gnome0 libpolkit-grant2 libpolkit2
  libpopt0 libpt-1.10.10 libpt-1.10.10-plugins-alsa libpt-1.10.10-plugins-v4l libpt-1.10.10-plugins-v4l2 libpth20
  libpulse-browse0 libpulse0 libpulsecore5 libpurple0 libqthreads-12 librarian0 libraw1394-8 librecode0
  librpc-xml-perl librsvg2-2 librsvg2-common libsamplerate0 libsane libsasl2-2 libsasl2-modules libscim8c2a
  libscrollkeeper0 libsdl1.2debian libsdl1.2debian-alsa libselinux1 libsensors3 libsepol1 libsgutils1 libshout3
  libsigc++-2.0-0c2a libslang2 libslp1 libsm6 libsmbclient libsnmp-base libsnmp15 libsoup2.4-1 libspeex1
  libsqlite3-0 libss2 libssl0.9.8 libstdc++6 libtag1c2a libtasn1-3 libterm-readkey-perl libtext-charwidth-perl
  libtext-iconv-perl libtext-wrapi18n-perl libthai-data libthai0 libtheora0 libtiff4 libtracker-gtk0
  libtrackerclient0 libuniconf4.4 libusb-0.1-4 libusplash0 libuuid1 libvisual-0.4-0 libvolume-id0 libvorbis0a
  libvorbisenc2 libvorbisfile3 libvte-common libvte9 libwavpack1 libwnck-common libwnck22 libwpd8c2a libwpg-0.1-1
  libwps-0.1-1 libwrap0 libwvstreams4.4-base libwvstreams4.4-extras libwww-perl libx11-6 libx11-data libx11-xcb1
  libx86-1 libxau6 libxaw7 libxcb-xlib0 libxcb1 libxcomposite1 libxdamage1 libxdmcp6 libxevie1 libxext6 libxfont1
  libxft2 libxi6 libxinerama1 libxkbfile1 libxklavier12 libxml-parser-perl libxml2 libxml2-utils libxp6
  libxrandr2 libxrender1 libxslt1.1 libxss1 libxtrap6 libxv1 libxxf86misc1 libxxf86vm1 libzephyr3 linux-generic
  linux-headers-generic linux-image-generic linux-restricted-modules-common linux-restricted-modules-generic
  linux-sound-base locales login logrotate lsb-base lsb-release lshw lsof ltrace lzma make makedev man-db
  manpages mawk memtest86+ mesa-utils metacity metacity-common mime-support min12xxw mktemp mlocate
  module-init-tools mono-common mono-gac mono-jit mono-runtime mount mousetweaks mscompress mtr-tiny
  myspell-en-gb myspell-en-za nano nautilus nautilus-cd-burner nautilus-data nautilus-sendto nautilus-share
  net-tools netbase netcat netcat-traditional network-manager network-manager-gnome notification-daemon ntfs-3g
  ntpdate nvidia-kernel-common obex-data-server openoffice.org-base-core openoffice.org-calc
  openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-gnome openoffice.org-gtk
  openoffice.org-help-en-gb openoffice.org-help-en-us openoffice.org-hyphenation-en-us openoffice.org-impress
  openoffice.org-l10n-common openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-style-human
  openoffice.org-thesaurus-en-au openoffice.org-thesaurus-en-us openoffice.org-writer openprinting-ppds
  openssh-blacklist openssh-client openssh-server openssl parted passwd pciutils perl perl-base perl-modules
  pidgin pidgin-data pidgin-otr pm-utils pnm2ppa policykit policykit-gnome poppler-utils popularity-contest
  powermgmt-base powernowd ppp pppconfig pppoeconf procps pulseaudio pulseaudio-esound-compat
  pulseaudio-module-gconf pulseaudio-module-hal pulseaudio-module-x11 pulseaudio-utils pxljr python python-apport
  python-apt python-brlapi python-cairo python-central python-cups python-dbus python-gconf python-gdbm
  python-glade2 python-gmenu python-gnome2 python-gnome2-desktop python-gnomecanvas python-gobject python-gst0.10
  python-gtk2 python-gtkhtml2 python-gtksourceview2 python-imaging python-launchpad-bugs
  python-launchpad-integration python-libxml2 python-minimal python-notify python-numeric python-problem-report
  python-pyatspi python-pyorbit python-software-properties python-support python-uno python-virtkey python-vte
  python-xdg python2.5 python2.5-minimal rdesktop readahead rhythmbox rss-glx rsync samba-common scim
  scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket screen scrollkeeper seahorse
  sed shared-mime-info smbclient software-properties-gtk sound-juicer splix sqlite3 ssh-askpass-gnome ssl-cert
  startup-tasks strace sudo synaptic sysklogd system-config-printer-common system-config-printer-gnome
  system-services system-tools-backends sysv-rc sysvutils tangerine-icon-theme tar tasksel tasksel-data tcpd
  tcpdump thunderbird-locale-en-gb time tomboy toshset totem totem-common totem-gstreamer totem-mozilla
  totem-plugins tracker tracker-search-tool transmission-common transmission-gtk tsclient ttf-arabeyes
  ttf-arphic-uming ttf-dejavu-core ttf-freefont ttf-indic-fonts-core ttf-kochi-gothic ttf-kochi-mincho
  ttf-malayalam-fonts ttf-opensymbol ttf-thai-tlwg ttf-unfonts-core tzdata ubufox ubuntu-artwork ubuntu-docs
  ubuntu-gdm-themes ubuntu-minimal ubuntu-sounds ubuntu-standard ubuntu-wallpapers ucf udev ufw
  unattended-upgrades unzip update-inetd update-manager update-manager-core update-notifier
  update-notifier-common upstart upstart-compat-sysv upstart-logd usbutils usplash usplash-theme-ubuntu
  util-linux util-linux-locales uuid-runtime vbetool vim-common vim-tiny vinagre vino w3m wamerican wbritish wget
  whiptail whois wodim wpasupplicant wvdial x-ttcidfont-conf x11-apps x11-common x11-utils x11-xkb-utils
  x11-xserver-utils xauth xbase-clients xdg-user-dirs xdg-user-dirs-gtk xdg-utils xfonts-utils xinit xkb-data
  xml-core xorg xsane xsane-common xscreensaver-data xscreensaver-gl xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-kbd xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-input-wacom xserver-xorg-video-all
  xserver-xorg-video-amd xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
  xserver-xorg-video-chips xserver-xorg-video-cirrus xserver-xorg-video-dummy xserver-xorg-video-fbdev
  xserver-xorg-video-geode xserver-xorg-video-glint xserver-xorg-video-i128 xserver-xorg-video-i740
  xserver-xorg-video-i810 xserver-xorg-video-intel xserver-xorg-video-mga xserver-xorg-video-neomagic
  xserver-xorg-video-nsc xserver-xorg-video-nv xserver-xorg-video-openchrome xserver-xorg-video-rendition
  xserver-xorg-video-s3 xserver-xorg-video-s3virge xserver-xorg-video-savage xserver-xorg-video-siliconmotion
  xserver-xorg-video-sis xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-tga
  xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-v4l xserver-xorg-video-vesa
  xserver-xorg-video-vga xserver-xorg-video-vmware xserver-xorg-video-voodoo xsltproc xterm xulrunner-1.9
  xulrunner-1.9-gnome-support xutils xutils-dev yelp zenity zlib1g
939 upgraded, 127 newly installed, 20 to remove and 1 not upgraded.
Need to get 582MB of archives.
After this operation, 304MB of additional disk space will be used.
Do you want to continue [Y/n]? n</pre>
<h4>5. Reboot and enjoy the upgraded system</h4>
<p>Reboot your Ubuntu:</p>
<pre>ubuntu# <strong>shutdown -i6 -r now</strong></pre>
<p>&#8230; and once your system is back up, you're ready to verify that it's been successfully upgraded:</p>
<pre>ubuntu# <strong>cat /etc/lsb-release</strong>
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"</pre>
<p>That's it, good luck with your Ubuntu upgrade!</p>
<h3>Related books</h3>
<p>If you want to learn more about Ubuntu, here's a great book:</p>
<div id="attachment_363" class="wp-caption aligncenter" style="width: 144px"><a href="http://www.amazon.com/gp/product/1934356220?ie=UTF8&amp;tag=unixtutorial-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356220"><br />
<img class="size-full wp-image-370" title="ubuntu-kung-fu-practical-guide" src="http://www.unixtutorial.org/images/ubuntu-kung-fu-practical-guide.jpg" alt="ubuntu-kung-fu-practical-guide" width="134" height="160" /></a><p class="wp-caption-text">Ubuntu Kung Fu</p></div>
<h3>See also:</h3>
<ul>
<li><strong><a title="ubuntu releases" href="http://www.unixtutorial.org/reference/ubuntu-releases-and-codenames/">Ubuntu releases and codenames</a></strong></li>
<li><strong><a title="Intrepid Ibex" href="http://www.unixtutorial.org/2008/10/ubuntu-810-intrepid-ibex-is-here/">Ubuntu 8.10: Intrepid Ibex</a></strong></li>
<li><strong><a title="List packages in Ubuntu" href="http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/">List installed packages in Ubuntu</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/01/ubuntu-upgrade-from-hardy-heron-to-intrepid-ibex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Check if Any Users Were Added or Deleted on Your Linux System</title>
		<link>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/</link>
		<comments>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 00:54:27 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Advanced topics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=345</guid>
		<description><![CDATA[Yesterday in my post on numeric userids instead of usernames, I touched briefly the problem of recovering the username if you only know the userid it once had. Today I would like to show you another option which may be available to you when it comes to recovering the usernames of removed users by their [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday in my post on <a title="numeric userids i unix" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">numeric userids instead of usernames</a>, I touched briefly the problem of recovering the username if you only know the userid it once had. Today I would like to show you another option which may be available to you when it comes to recovering the usernames of removed users by their userid.</p>
<h3>useradd and userdel logs in Ubuntu</h3>
<p>Both <strong>useradd </strong>and userdel commands keep logs in many Unix-like systems. This means that every newly created user gets the whole procedure documented in appropriate logs with lines similar to this (it's an Ubuntu example, <strong>/var/log/auth.log</strong> file):</p>
<pre>Jan  6 04:24:27 simplyunix useradd[1456]: new group: name=mike, GID=1006
Jan  6 04:24:27 simplyunix useradd[1456]: new user: name=mike, UID=1006, GID=1006, home=/home/mike, shell=/bin/sh</pre>
<p>Similarly, deleting a file doesn't go unnoticed neither:</p>
<pre>Jan  6 04:29:21 simplyunix userdel[1516]: delete user `mike'
Jan  6 04:29:21 simplyunix userdel[1516]: delete `mike' from group `admin'
Jan  6 04:29:21 simplyunix userdel[1516]: removed group `mike' owned by `mike'</pre>
<p>So, there's a chance that by simply going through /var/log/auth.log you will find the userid of a local Unix user which was recently removed. But the reason I won't say "there's a really good chance" is because most of the logs in /var/log are rotated on a weekly and monthly basis, and this means the information about new users created or deleted may not be there at the time you go looking for it &#8211; anyone who was added or deleted more than few months ago will not show up.</p>
<h3>useradd and userdel in RedHat Enterprise Linux</h3>
<p>Similar to Ubuntu, you can find recent user management activity logged in RHEL system, in /var/log/secure file.</p>
<p><strong>useradd </strong>will produce something link this:</p>
<pre>Jan  8 00:18:36 rhel5 useradd[2674]: new group: name=newuser, GID=501
Jan  8 00:18:36 rhel5 useradd[2674]: new user: name=newuser, UID=501, GID=501, home=/home/newuser, shell=/bin/bash</pre>
<p>&#8230; while <strong>userdel </strong>will document its actions with the following:</p>
<pre>Jan  8 00:18:40 rhel5 userdel[2682]: delete user `newuser'
Jan  8 00:18:40 rhel5 userdel[2682]: removed group `newuser' owned by `newuser'</pre>
<h3>How to check if any users were added on your Unix system</h3>
<p>Based on the information above, all you have to do is something like this:</p>
<pre>ubuntu$ <strong>grep useradd /var/log/* </strong></pre>
<p>This is bound to return you a list of all the recently added users.</p>
<h3>How to confirm local users which were recently removed</h3>
<p>Similarly, use a command like this to find out if any users were recently removed:</p>
<pre>ubuntu$ <strong>grep userdel /var/log/* </strong></pre>
<p>Hope this helps! Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="userids instead of usernames" href="http://www.unixtutorial.org/2009/01/what-to-do-if-numeric-id-is-shown-instead-of-unix-username/">What to do if numerid userids are shown instead of usernames in file ownership</a></strong></li>
<li><strong><a title="create unix accounts" href="http://www.unixtutorial.org/2008/12/how-to-create-user-accounts-in-unix/">Creating new users in Unix with useradd</a><br />
</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/01/how-to-check-if-any-users-were-added-or-deleted-on-your-linux-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List Installed Packages on Your Ubuntu Linux</title>
		<link>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/</link>
		<comments>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:00:28 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=80</guid>
		<description><![CDATA[If you're interested in what exactly your Ubuntu system has got installed, there's a command you can use to list the packages along with their versions and short descriptions. How packages information is stored in Ubuntu Essentially being a fork of the Debian Linux, Ubuntu inherited quite a lot of things from it. One of [...]]]></description>
			<content:encoded><![CDATA[<p>If you're interested in what exactly your Ubuntu system has got installed, there's a command you can use to list the packages along with their versions and short descriptions.</p>
<h3>How packages information is stored in Ubuntu</h3>
<p>Essentially being a fork of the Debian Linux, Ubuntu inherited quite a lot of things from it. One of them is the way packages are installed and managed.</p>
<p><strong>dpkg </strong>(Debian Package Manager) is a command found in every Ubuntu installation. While managing software packages, it stores all the files it depends upon in a <strong>/var/lib/dpkg</strong> directory. Most of these files you can look into using basic Unix commands, but there's really no need because <strong>dpkg </strong>does it for you.</p>
<p>For example, status of all the installed packages is stored in <strong>/var/lib/dpkg/status</strong> file.<br />
Here's how it looks, just to give you an idea:</p>
<pre>Package: bash
Essential: yes
Status: install ok installed
Priority: required
Section: shells
Installed-Size: 2012
Maintainer: Ubuntu Core developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;
Architecture: amd64
Version: 3.2-0ubuntu7
Replaces: bash-doc (&lt;= 2.05-1), bash-completion
Depends: base-files (&gt;= 2.1.12), debianutils (&gt;= 2.15)
Pre-Depends: libc6 (&gt;= 2.5-0ubuntu1), libncurses5 (&gt;= 5.4-5)
Suggests: bash-doc
Conflicts: bash-completion
Conffiles:
 /etc/skel/.bashrc 52acca91b52f797661c89b181809b9f3
 /etc/skel/.profile 7d97942254c076a2ea5ea72180266420
 /etc/skel/.bash_logout 22bfb8c1dd94b5f3813a2b25da67463f
 /etc/bash.bashrc 860d464fca66fff1af4993962a253611
 /etc/bash_completion c8bce25ea68fb0312579a421df99955c
 /etc/skel/.bash_profile d1a8c44e7dd1bed2f3e75d1343b6e4e1 obsolete
Description: The GNU Bourne Again SHell
 Bash is an sh-compatible command language interpreter that executes
 commands read from the standard input or from a file.  Bash also
 incorporates useful features from the Korn and C shells (ksh and csh).
 .</pre>
<p>As you can see, there's all the possible information about bash package (the Bourne Again Shell), but you usually don't need to know this much, so instead we'll use dpkg command to confirm what packages are installed and which ones are not.</p>
<h3>List installed packages with dpkg</h3>
<p>The easiest way to confirm the list of packages installed on your Ubuntu OS is to run dpkg -l command. The output is quite long, so I'll only show you a fragment of it:</p>
<pre>ubuntu# <strong>dpkg -l | more</strong>
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                       Version                                      Description
+++-==========================-============================================-============================================
ii  adduser                    3.100                                        Add and remove users and groups
ii  alsa-base                  1.0.13-3ubuntu1                              ALSA driver configuration files
ii  alsa-utils                 1.0.13-1ubuntu5                              ALSA utilities
ii  apache2                    2.2.3-3.2ubuntu2.1                           Next generation, scalable, extendable web se
rc  apache2-common             2.0.55-4ubuntu4                              next generation, scalable, extendable web se
ii  apache2-doc                2.2.3-3.2ubuntu2.1                           documentation for apache2
ii  apache2-mpm-prefork        2.2.3-3.2ubuntu2.1                           Traditional model for Apache HTTPD 2.1
ii  apache2-utils              2.2.3-3.2ubuntu2.1                           utility programs for webservers
ii  apache2.2-common           2.2.3-3.2ubuntu2.1                           Next generation, scalable, extendable web se
ii  apt                        0.6.46.4ubuntu10                             Advanced front-end for dpkg
ii  apt-utils                  0.6.46.4ubuntu10                             APT utility programs
ii  aptitude                   0.4.4-1ubuntu3                               terminal-based apt frontend
ii  at                         3.1.10ubuntu4                                Delayed job execution and batch processing
ii  autoconf                   2.61-3                                       automatic configure script builder
ii  automake1.4                1.4-p6-12                                    A tool for generating GNU Standards-complian
ii  automake1.9                1.9.6+nogfdl-3ubuntu1                        A tool for generating GNU Standards-complian
ii  autotools-dev              20060920.1                                   Update infrastructure for config.{guess,sub}
ii  awstats                    6.5+dfsg-1ubuntu3                            powerful and featureful web server log analy
ii  base-files                 4ubuntu2                                     Debian base system miscellaneous files</pre>
<p>The legend at the very top of the output explains the first 3 charactes of each line in the dpkg output, the symbols there confirm whether each package is expected to be installed, and whether it's actually installed or partially installed:</p>
<pre>
<pre>Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=b
||/ Name                       Version                                      Description
+++-==========================-============================================-============================================
ii  adduser                    3.100                                        Add and remove users and groups</pre>
</pre>
<p>A first letter of each option is used, so ii for the adduser package in this example means that the desired state for this package is "Installed" (first i) and the actual status is "Installed" as well. That's the normal condition for most of your packages.</p>
<p>As you can also see, each line shows you the version of each package you have and provides a brief description of what a package is used for.</p>
<p>That's it, this should be a good start for your Ubuntu exploration, I'll post a few more things about <strong>dpkg </strong>in the future.</p>
<h3>Related books</h3>
<p>If you want to learn more, here's a great book:</p>
<div id="attachment_363" class="wp-caption aligncenter" style="width: 144px"><a href="http://www.amazon.com/gp/product/1934356220?ie=UTF8&amp;tag=unixtutorial-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356220"><br />
<img class="size-full wp-image-370" title="ubuntu-kung-fu-practical-guide" src="http://www.unixtutorial.org/images/ubuntu-kung-fu-practical-guide.jpg" alt="ubuntu-kung-fu-practical-guide" width="134" height="160" /></a><p class="wp-caption-text">Ubuntu Kung Fu</p></div>
<h3>See also:</h3>
<ul>
<li><strong><a title="Debian Linux" href="http://en.wikipedia.org/wiki/Debian">Debian @ Wikipedia</a></strong></li>
<li><strong><a title="Unix Release version" href="http://www.unixtutorial.org/2007/08/how-to-find-out-the-release-version-of-your-unix/">Finding out the release version of your Unix</a></strong></li>
<li><strong><a title="apt-get proxy" href="http://www.unixtutorial.org/2007/09/how-to-use-apt-get-behind-proxy/">apt-get behind proxy</a></strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What UUIDs Are and How To Use Them in Ubuntu</title>
		<link>http://www.unixtutorial.org/2008/05/ubuntu-uuid-how-to/</link>
		<comments>http://www.unixtutorial.org/2008/05/ubuntu-uuid-how-to/#comments</comments>
		<pubDate>Mon, 12 May 2008 12:30:09 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=49</guid>
		<description><![CDATA[If you tried installing or upgrading Ubuntu recently, you probably noticed that all the storage devices are now using UUID &#8211; Universally Unique IDentifiers. I'm not claiming to know everything there is to know about UUIDs, but have become quite comfortable managing them lately, so hopefully this post will help you achieve the same. What [...]]]></description>
			<content:encoded><![CDATA[<p>If you tried installing or upgrading Ubuntu recently, you probably noticed that all the storage devices are now using UUID &#8211; Universally Unique IDentifiers. I'm not claiming to know everything there is to know about UUIDs, but have become quite comfortable managing them lately, so hopefully this post will help you achieve the same.</p>
<h3>What is a UUID exactly?</h3>
<p><strong>UUID</strong> is a <em>Universally Unique IDentifier</em>. It's a identification code given to each storage device you have on your system, aimed to help you uniquely identify each device no matter what.</p>
<p>UUIDs can be used to identify DVD drives, removable media (USB flashsticks) and each partition on any of your hard drives.</p>
<p>This is how a typical UUID looks:</p>
<p>c73a37c8-ef7f-40e4-b9de-8b2f81038441</p>
<h3>Why use UUID?</h3>
<h4>Reason 1: Truly unique identification</h4>
<p>UUID is the only way to guarantee you recognize the same drive or partition no matter what. For example, if you introduce to your system another hard drive, this might upset quite a few things, starting with the way your system boots up (or stops booting up upon the new drive introduction). Using UUID helps remedy most of such things.</p>
<h4>Reason 2: Device names are not always persistent</h4>
<p>Automatically assigned device names in your system are not consistent, they are according to the order of loading the kernel modules up during (most usually) the startup time, and thus the names will look different if you boot with one of your USB flashsticks attached and then reboot after you plug it out.</p>
<p>Generally, I've also found UUIDs really useful for mounting my removable media &#8211; I have a USB reader, one of the 24-in-1 kinds &#8211; it supports various types of cards and I use UUID to always mount the same card at the same location.</p>
<h4>Reason 3: Most critical functionality of your Ubuntu system already depends on UUIDs</h4>
<p>GRUB &#8211; your boot loader &#8211; relies on UUIDs as well. If you look into <strong>/boot/grub/menu.lst</strong> file, you'll find something similar to this:</p>
<p>title           Ubuntu hardy (development branch), kernel 2.6.24-16-generic<br />
root            (hd2,0)<br />
kernel          /boot/vmlinuz-2.6.24-16-generic root=UUID=c73a37c8-ef7f-40e4-b9de-8b2f81038441 ro quiet splash<br />
initrd          /boot/initrd.img-2.6.24-16-generic<br />
quiet</p>
<h3>List UUIDs for all your devices</h3>
<p>If you are using one of the recent releases of Ubuntu (UUIDs have been there since Edgy), you can use the blkid command to get a list of all the drives and partitions along with their UUIDs:</p>
<pre>ubuntu# <strong>blkid</strong>
/dev/sda1: UUID="2220CF8220CF5B83" TYPE="ntfs"
/dev/sda2: UUID="48E81F29E81F14B2" LABEL="DRIVE-D" TYPE="ntfs"
/dev/sdb1: UUID="c73a37c8-ef7f-40e4-b9de-8b2f81038441" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb5: TYPE="swap" UUID="abe7529e-dcd5-4afc-b714-05569dbcd30b"
/dev/sdb6: UUID="f34c8c7c-a020-4a14-8c97-257180240250" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb7: UUID="8fa274ca-5b22-411f-b5da-7469c1f276da" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdc1: UUID="1e36f323-c4e5-4f55-ba0a-838643550bf9" TYPE="ext3" SEC_TYPE="ext2"
/dev/sdc2: UUID="83aa92e4-4df4-4aab-80f3-9bbb447e0459" TYPE="ext3" SEC_TYPE="ext2"</pre>
<p>As you can see, I've still got a few NTFS partitions as I'm slowly migrating my data from Windows after my switch to Ubuntu desktop a couple months ago.</p>
<h3>Get UUID for a particular device</h3>
<p>If you know a device name and just want to confirm the UUID for it to later use it in <strong>/etc/fstab</strong>, here's how you can do it using <strong>vol_id</strong> command:</p>
<pre>ubuntu# <strong>vol_id -u /dev/sdb1</strong>
c73a37c8-ef7f-40e4-b9de-8b2f81038441</pre>
<p>That's all I can think of so far. I know a few more things about UUID which I'll share in a separate post, but it's a start.</p>
<p>Have you got any more great ideas and tips for UUID? Let me know and I'll be sure to share them with others in the future posts.</p>
<h3>Related books</h3>
<p>If you want to learn more, here's a great book:</p>
<div id="attachment_363" class="wp-caption aligncenter" style="width: 144px"><a href="http://www.amazon.com/gp/product/1934356220?ie=UTF8&amp;tag=unixtutorial-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1934356220"><br />
<img class="size-full wp-image-370" title="ubuntu-kung-fu-practical-guide" src="http://www.unixtutorial.org/images/ubuntu-kung-fu-practical-guide.jpg" alt="ubuntu-kung-fu-practical-guide" width="134" height="160" /></a><p class="wp-caption-text">Ubuntu Kung Fu</p></div>
<h3>See also:</h3>
<ul>
<li><a title="Mounting ISO images in Linux" href="http://www.unixtutorial.org/2007/12/how-to-mount-an-iso-image/">How to mount an ISO image</a></li>
<li><a title="Find largest files" href="http://www.unixtutorial.org/2008/03/find-large-files-and-directories/">Find large files and directories in Unix</a></li>
<li><a href="https://help.ubuntu.com/community/UsingUUID">Using UUIDs &#8211; Ubuntu Help wiki</a></li>
<li><a title="Default block size" href="http://www.unixtutorial.org/2008/04/default-block-size-in-unix/">How to find the default block size in Unix</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/05/ubuntu-uuid-how-to/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How To Show a Processes Tree in Unix</title>
		<link>http://www.unixtutorial.org/2008/05/how-to-show-a-processes-tree-in-unix/</link>
		<comments>http://www.unixtutorial.org/2008/05/how-to-show-a-processes-tree-in-unix/#comments</comments>
		<pubDate>Thu, 01 May 2008 12:30:37 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=47</guid>
		<description><![CDATA[Showing your processes in a hierarchical list is very useful for confirming the relationship between every process running on your system. Today I'd like to show you how you can get tree-like processes lists using various commands. Showing processes tree with ptree In Solaris, there's quite a few commands which make the life of any [...]]]></description>
			<content:encoded><![CDATA[<p>Showing your processes in a hierarchical list is very useful for confirming the relationship between every process running on your system. Today I'd like to show you how you can get tree-like processes lists using various commands.</p>
<h3>Showing processes tree with ptree</h3>
<p>In Solaris, there's quite a few commands which make the life of any system administrator much easier, they're the process commands (p-commands). One of them which I particularly like is the ptree command which shows you a list of processes.</p>
<p>As you run the command, you get a hierarchical list of all the processes running on your Solaris system, along with process IDs (PIDs). To me, this is a very useful command, because it shows you how exactly each process relates to others in your system.</p>
<p>Here's a fragment of the ptree output:</p>
<pre>bash-3.00$ <strong>ptree</strong>
7     /lib/svc/bin/svc.startd
  250   /usr/lib/saf/sac -t 300
    268   /usr/lib/saf/ttymon
  260   -sh
    5026  -csh
9     /lib/svc/bin/svc.configd
107   /usr/lib/sysevent/syseventd
136   /usr/lib/picl/picld
140   /usr/lib/crypto/kcfd
159   /usr/sbin/nscd
227   /usr/sbin/rpcbind
234   /usr/lib/nfs/statd
235   /usr/sbin/keyserv
236   /usr/lib/netsvc/yp/ypserv -d
  237   rpc.nisd_resolv -F -C 8 -p 1073741824 -t udp
241   /usr/lib/nfs/lockd
247   /usr/lib/netsvc/yp/ypbind
263   /usr/lib/utmpd
286   /usr/sadm/lib/smc/bin/smcboot
  287   /usr/sadm/lib/smc/bin/smcboot
  288   /usr/sadm/lib/smc/bin/smcboot</pre>
<h3>Processes tree with pstree</h3>
<p>In most Linux distributions, you can find a pstree command, very similar to ptree.</p>
<p>That's how you may use it (-p is an option to show PIDs and -l uses long output format):</p>
<pre>ubuntu$ <strong>pstree -pl</strong>
init(1)─┬─NetworkManager(5427)
        ├─NetworkManagerD(5441)
        ├─acpid(5210)
        ├─apache2(6966)─┬─apache2(2890)
        │               ├─apache2(2893)
        │               ├─apache2(7163)
        │               ├─apache2(7165)
        │               ├─apache2(7166)
        │               ├─apache2(7167)
        │               └─apache2(7168)
        ├─atd(6369)
        ├─avahi-daemon(5658)───avahi-daemon(5659)
        ├─bonobo-activati(7816)───{bonobo-activati}(7817)
...</pre>
<h3>Showing processes tree with ps &#8211;forest</h3>
<p>ps command found in Linux has a &#8211;forest option, which shows you a tree structure of processes.</p>
<p>The best in my experience is to use it like this:</p>
<pre>ubuntu$ <strong>ps -aef --forest</strong>
UID        PID  PPID  C STIME TTY          TIME CMD
...
107       5473     1  0 10037  4600   0 Apr28 ?        00:00:02 /usr/sbin/hald
root      5538  5473  0  5511  1288   0 Apr28 ?        00:00:00  \_ hald-runner
root      5551  5538  0  6038  1284   0 Apr28 ?        00:00:01      \_ hald-addon-input: Listening on /dev/input
107       5566  5538  0  4167   992   1 Apr28 ?        00:00:00      \_ hald-addon-acpi: listening on acpid socke
root      5600  5538  0  6038  1272   1 Apr28 ?        00:00:15      \_ hald-addon-storage: polling /dev/scd0 (ev
root      5476     1  0 10272  2532   0 Apr28 ?        00:00:00 /usr/sbin/console-kit-daemon
root      5627     1  0 12728  1176   1 Apr28 ?        00:00:00 /usr/sbin/sshd
root      9151  5627  0 17536  3032   0 10:53 ?        00:00:00  \_ sshd: greys [priv]
greys     9162  9151  0 17538  1892   1 10:54 ?        00:00:00      \_ sshd: greys@pts/3
greys     9168  9162  0  5231  3820   1 10:54 pts/3    00:00:00          \_ -bash
greys     9584  9168  0  3802  1124   0 11:27 pts/3    00:00:00              \_ ps -aeF --forest</pre>
<p>This output is for demonstration purpose only, and so I've taken the first lines of the output out because they weren't serving the purpose of this example very well.</p>
<p>For thins fragment of the output you can see how you get all the vital information about each process. I really like this way of running the ps command.</p>
<p>That's it for today! Do you know any other neat way of looking at processes tree? Let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/05/how-to-show-a-processes-tree-in-unix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To Install 32-bit Debian Packages on 64-bit System</title>
		<link>http://www.unixtutorial.org/2008/03/install-32-bit-deb-packages-on-64-bit/</link>
		<comments>http://www.unixtutorial.org/2008/03/install-32-bit-deb-packages-on-64-bit/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 12:30:50 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Advanced topics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=40</guid>
		<description><![CDATA[Many software products, especially the commercial ones, are distributed as 32-bit packages. This means that they won't be installed on your 64-bit system unless you clearly specify that you want to override the architecture dependency. If you're using Ubuntu or any other Debian based distribution, this post will teach you how to install 32-bit deb [...]]]></description>
			<content:encoded><![CDATA[<p>Many software products, especially the commercial ones, are distributed as 32-bit packages. This means that they won't be installed on your 64-bit system unless you clearly specify that you want to override the architecture dependency.</p>
<p>If you're using Ubuntu or any other Debian based distribution, this post will teach you how to install 32-bit deb packages on your 64-bit OS.</p>
<h3>Is it possible to run 32-bit applications on 64-bit OS?</h3>
<p>In Unix world, yes: it is quite possible to run 32-bit binaries on 64-bit OS. There should generally be no problem, but there are, as always, a few caveats:</p>
<ul>
<li>your 64-bit system may need some 32-bit libraries installed just to make some old 32-bit software work (use <strong>getlibs</strong> in Ubuntu)</li>
<li>even if 32-bit application runs on your 64-bit system, it will still have the 32-bit limitations</li>
<li>some (especially commercial) software has hard-coded architecture checks which will prevent them from working in 64-bit mode. Although it's a rather rare case, it still may happen and it probably means the developers had a really good reason for putting such limitations in</li>
</ul>
<h3>Why 32-bit packages don't install on 64-bit by default</h3>
<p>One of the main reasons is that if a certain software is provided in 32-bit configuration, it's very likely to be available in 64-bit one as well. In Unix especially so, since a properly coded application can very easily be compiled for both architectures, especially if you have a 32-bit application and it's only a matter of recompiling it in 64-bit.</p>
<p>It's always best to have 64-bit version of the software, as it will run better and enjoy most optimal performance by running in the native mode and using 64-bit libraries of your OS.</p>
<p>The default behaviour is to let you know that you're trying to install an architecturally incompatible piece of software, which should motivate you to double-check the availability of a 64-bit version. For example, this is what I get when installing a <a href="http://www.skype.com">Skype</a> for Linux on my Ubuntu 7.10 64-bit desktop:</p>
<pre>ubuntu# <strong>dpkg -i ./skype-debian_2.0.0.63-1_i386.deb </strong>
dpkg: error processing ./skype-debian_2.0.0.63-1_i386.deb (--install):
 package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
 ./skype-debian_2.0.0.63-1_i386.deb</pre>
<h3>How To Install 32-bit Debian Packages on 64-bit System</h3>
<p>Since I know there isn't a 64-bit distribution of Skype, I would still like to install the package as it should work just fine. And the way to do this is to specify a <strong>&#8211;force-architecture</strong> option in <strong>dpkg</strong> command line:</p>
<pre>ubuntu# <strong>dpkg -i --force-architecture ./skype-debian_2.0.0.63-1_i386.deb </strong>
dpkg - warning, overriding problem because --force enabled:
 package architecture (i386) does not match system (amd64)
Selecting previously deselected package skype.
(Reading database ... 124455 files and directories currently installed.)
Unpacking skype (from .../skype-debian_2.0.0.63-1_i386.deb) ...
Setting up skype (2.0.0.63-1) ...</pre>
<p>As you can see, we're getting a warning, but the install went through just fine.</p>
<p><strong>Warning</strong>: there's a few further steps to get Skype working in 64-bit Ubuntu, so don't take the above as a Skype how-to, these steps are out of the scope of this post though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/03/install-32-bit-deb-packages-on-64-bit/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Find the Largest Files in your Unix system</title>
		<link>http://www.unixtutorial.org/2008/03/how-to-find-the-largest-files/</link>
		<comments>http://www.unixtutorial.org/2008/03/how-to-find-the-largest-files/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 17:00:52 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/2008/03/how-to-find-the-largest-files/</guid>
		<description><![CDATA[I see that my Finding Large Files and Directories post is quite popular, yet there are a few more ways to simplify your search for the largest disk space consumers in your Unix system. Make find command show file sizes If you remember, the default way a find command reports results includes only the fully [...]]]></description>
			<content:encoded><![CDATA[<p>I see that my <a href="http://www.unixtutorial.org/2008/03/find-large-files-and-directories/" title="Finding Large Files and Directories in Unix">Finding Large Files and Directories</a> post is quite popular, yet there are a few more ways to simplify your search for the largest disk space consumers in your Unix system.</p>
<h3>Make find command show file sizes</h3>
<p>If you remember, the default way a find command reports results includes only the fully qualified (that means including the full path) filenames.</p>
<p>Now, if you look at a task of identifying the largest files, it's great if you can get a list of all the files bigger than some figure your specify, but what would be even better is to include the exact size of each file right into the output of the find command.</p>
<h3></h3>
<p>Here's how you do it: it's possible to specify which information about each file you'd like to see. Check out the find command man page for all the possibilities, but in today's example I'm using two parameters: %s means the size of a file in bytes and %f means the filename itself.</p>
<p>Let's say I want to get a list of all the files under /usr directory which are larger than 15Mb each, and show the exact size of each file. Here's how it can be done:</p>
<pre>ubuntu$ <strong>find /usr -size +15M -printf "%s - %p\n"</strong>
39859372 - /usr/lib/vmware/webAccess/java/jre1.5.0_07/lib/rt.jar
35487120 - /usr/lib/vmware/bin/vmware-hostd
16351166 - /usr/lib/vmware/bin/vmplayer
38353296 - /usr/lib/vmware/hostd/libtypes.so
54366585 - /usr/lib/vmware/hostd/docroot/client/VMware-viclient.exe
92143616 - /usr/lib/vmware/isoimages/linux.iso
23494656 - /usr/lib/vmware/isoimages/windows.iso
47070920 - /usr/lib/libgcj.so.81.0.0
20890468 - /usr/share/fonts/truetype/arphic/uming.ttf
17733780 - /usr/share/icons/crystalsvg/icon-theme.cache
18597793 - /usr/share/myspell/dicts/th_en_US_v2.dat
45345879 - /usr/src/linux-source-2.6.22.tar.bz2</pre>
<p>Just to help you refresh your mind, here's the explanation of all the parameters in the command line:</p>
<ul>
<li><strong>/usr</strong> is the directory where we'd like to find the files of interest</li>
<li><strong>-size +15M</strong> narrows our interest to only the files larger than 15Mb</li>
<li><strong>-printf "%s &#8211; %p\n"</strong> is the magic which shows the nice list of files along with their sizes.</li>
</ul>
<h3>Sort the list of files by filesize</h3>
<p>Next really useful thing we could do is to sort this list, just so that we could see a nice ordered representation of how big each file is. It's very easily done by piping the output of the find command to a sort command:</p>
<pre>ubuntu$ <strong>find /usr -size +15M -printf "%s - %p\n" | sort -n</strong>
16351166 - /usr/lib/vmware/bin/vmplayer
17733780 - /usr/share/icons/crystalsvg/icon-theme.cache
18597793 - /usr/share/myspell/dicts/th_en_US_v2.dat
20890468 - /usr/share/fonts/truetype/arphic/uming.ttf
23494656 - /usr/lib/vmware/isoimages/windows.iso
35487120 - /usr/lib/vmware/bin/vmware-hostd
38353296 - /usr/lib/vmware/hostd/libtypes.so
39859372 - /usr/lib/vmware/webAccess/java/jre1.5.0_07/lib/rt.jar
45345879 - /usr/src/linux-source-2.6.22.tar.bz2
47070920 - /usr/lib/libgcj.so.81.0.0
54366585 - /usr/lib/vmware/hostd/docroot/client/VMware-viclient.exe
92143616 - /usr/lib/vmware/isoimages/linux.iso</pre>
<p>As you can see, the smallest files (just above 15Mb) are at the top of the list, and the largest ones are at the bottom.</p>
<h3>Limit the number of files returned by find</h3>
<p>The last trick I'll show you today is going to make your task even easier: why look at the pages of find commnand output, if you're after only the largest files? After all, your list can be much longer than the one shown above. To solve this little problem we'll pipe the output of all the commands to yet another unix command, tail.</p>
<p>tail command allows you to show only a specified number of lines of any standard input or Unix text file you point it to. By default, it strips the number of lines to 10, which can be enough for your purposes.</p>
<p>Here's how you can get a least of the 10 largest files under /usr:</p>
<pre>ubuntu$ <strong>find /usr -size +15M -printf "%s - %p\n" | sort -n | tail</strong>
18597793 - /usr/share/myspell/dicts/th_en_US_v2.dat
20890468 - /usr/share/fonts/truetype/arphic/uming.ttf
23494656 - /usr/lib/vmware/isoimages/windows.iso
35487120 - /usr/lib/vmware/bin/vmware-hostd
38353296 - /usr/lib/vmware/hostd/libtypes.so
39859372 - /usr/lib/vmware/webAccess/java/jre1.5.0_07/lib/rt.jar
45345879 - /usr/src/linux-source-2.6.22.tar.bz2
47070920 - /usr/lib/libgcj.so.81.0.0
54366585 - /usr/lib/vmware/hostd/docroot/client/VMware-viclient.exe
92143616 - /usr/lib/vmware/isoimages/linux.iso</pre>
<h3>Show the largest 10 files in your Unix system</h3>
<p>Now that you know all the most useful tricks, you can easily identify and show the list of the 10 largest files in your whole system. Bear in mind, that you should probably run this command with root privileges, as files in your system belong to various users, and a single standard user account will most likely have insufficient privileges to even list such files.</p>
<p>If you're trying to locate your largest files in Ubuntu, use the sudo command (assuming you have the sudo privileges to become root):</p>
<pre>ubuntu$ <strong>sudo find / -size +15M -printf "%s - %p\n" | sort -n | tail</strong></pre>
<p>alternatively, just become root by doing something like this (you obviously should know the root password to do that):</p>
<pre>$<strong> su - root </strong></pre>
<p>and then run the find command itself. Here's how the output looks on my Ubuntu desktop:</p>
<pre>ubuntu$<strong> find / -size +15M -printf "%s - %p\n" | sort -n | tail</strong>
39859372 - /usr/lib/vmware/webAccess/java/jre1.5.0_07/lib/rt.jar
45345879 - /usr/src/linux-source-2.6.22.tar.bz2
45356784 - /var/cache/apt/archives/linux-source-2.6.22_2.6.22-14.52_all.deb
45424028 - /var/cache/apt/archives/kde-icons-oxygen_4%3a4.0.2-0ubuntu1~gutsy1~ppa1_all.deb
47070920 - /usr/lib/libgcj.so.81.0.0
54366585 - /export/dist/vmware/server2b2/vmware-server-distrib/lib/hostd/docroot/client/VMware-viclient.exe
54366585 - /usr/lib/vmware/hostd/docroot/client/VMware-viclient.exe
92143616 - /export/dist/vmware/server2b2/vmware-server-distrib/lib/isoimages/linux.iso
92143616 - /usr/lib/vmware/isoimages/linux.iso
340199772 - /export/dist/vmware/server2b2/VMware-server-e.x.p-63231.x86_64.tar.gz</pre>
<p>That's it for today, hope this helps! Please bookmark this post if you liked it, and leave comments if there are any questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2008/03/how-to-find-the-largest-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
