Oz in 30 Seconds - Make a Political Add Ubuntu Linux Tip of the Day - Install Additional Codecs for Media Playback
May 05

Ubuntu Linux rests on an incredibly powerful package management system based on Debian Linux. This package management system known as Apt manages an extensive database of packages which have been in stalled and which are available to be installed through repositories.

This guide goes through Apt and how to easily download and install programs through Apt, and also how to handle tared archives and build applications from source.

Installing packages

sudo aptitude install <packagename>

Examples:

sudo aptitude install mpd sbackup

Removing packages

sudo aptitude remove <packagename>

Examples:

sudo aptitude remove mpd sbackup

Searching for packages

sudo aptitude search <keywords>

Examples:

sudo aptitude search Music MP3
sudo aptitude search “Text Editor”

Updating Apt database (used after adding/removing Apt repositories)

sudo aptitude update

Upgrading packages

sudo aptitude upgrade

Upgrade entire distribution

sudo aptitude dist-upgrade

Install downloaded Ubuntu (Debian) package (.deb)

sudo dpkg -i package.deb

Remove Ubuntu (Debian) package

sudo dpkg -r package

Reconfigure/Repair installed package

sudo dpkg-reconfigure package

Examples:

sudo dpkg-reconfigure mpd

Handling “.tar.gz” (Tar/GZip) Archives

To extract:

tar xvzf package.tar.gz

To create:

tar cvfz package.tar.gz folder

* Handling “.tar.bz” (Tar/BZip) Archives

To extract:

tar xvjf package.tar.bz

To create:

tar cvjf package.tar.bz folder

Extracting “.bz” Archives

bunzip2 file.bz

Extracting “.gz” Archives

gunzip file.gz

Building from Source

Make sure you have all the necessary development tools (i.e. libraries, compilers, headers)

sudo aptitude install build-essential
sudo aptitude install linux-headers-`uname -r`

Extract your package (as detailed above)

tar xvzf package.tar.gz

Commence the build process

cd /path/to/extracted/package
./configure
make
make install

If build is successful, consider making an Ubuntu (Debian) package (.deb) for future use:

Install package tools:

sudo aptitude install checkinstall

Rebuild package using “checkinstall”:

cd /path/to/extracted/package
./configure
make
checkinstall

Keep the resulting “.deb” file for future use. It can be installed using:

sudo dpkg -i package.deb

Note: These are basic instructions that may not always work. Some packages require additional dependencies and optional parameters to be specified in order to build them successfully.

How to manually update Ubuntu

sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade

OR

Use Update Manager: System -> Administration -> Update Manager

Would you like to buy me a beer?

If you enjoyed this post, make sure you subscribe to my RSS feed!

Random Posts

One Response to “Ubuntu Linux Tip of the Day - Apt, .deb, Source, .tar, and other Package Basics”

  1. Kingsley Says:

    sudo dpkg -r package.deb to uninstall the debian package.

Leave a Reply

Donate to CLiCK Computer Recycling

Matt Vapor