User Tools

Site Tools


aoe:ubuntu

Ubuntu

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo atp-cache search build*

This link describes desktop and server release upgrade procedures http://www.howtoforge.com/how-to-upgrade-ubuntu-8.04-to-ubuntu-8.10-desktop-and-server

List package names available

apt-cache pkgnames

Others

http://www.thegeekstuff.com/2009/10/debian-ubuntu-install-upgrade-remove-packages-using-apt-get-apt-cache-apt-file-dpkg/

apt-cache search ^apache2$
apt-cache search "Apache HTTP Server"
apt-cache show apache2
apt-cache showpkg apache2
apt-file list apache2 |more
apt-file search apache2.conf
apt-cache depends apache2
dpkg -l |grep -i apache
sudo apt-get install apache2
dpkg -l |grep apache
sudo apt-get purge apache2 (removes configuration files)
sudo apt-get remove apache2 (leaves configuration files)
sudo apt-get -u install apache2 (update only specified package)
sudo apt-get -u upgrade (Upgrade all packages)

agt-get secrets

The basics

Resynchronise installed packages with their sources. (Always do this before an upgrade.)

apt-get update

Install the newest version of all packages installed on the system.

apt-get upgrade

Upgrade to the latest version of your distribution.

apt-get dist-update

Install programs xxx, yyy and zzz along with all their dependencies.

apt-get install xxx yyy zzz

Remove programs xxx, yyy and zzz.

apt-get remove xxx yyy zzz

Remove programs xxx, yyy and zzz and delete any configuration files that they used.

apt-get purge xxx yyy zzz

Update the package cache and check for any broken dependencies.

apt-get check

Clean out retrieved package files.

apt-get clean

Clean out retrieved package files, but only those that are no longer needed.

apt-get autoclean

Remove any packages that were installed to satisfy dependencies but are no longer required.

apt-get autoremove
Advanced stuff

So much for the basics, what about those neat tricks I mentioned? Well, did you know you can use apt-get to get a package’s source code?

Retrieve source files for package xxx.

apt-get source xxx

Or its build dependencies?

Get all the dependencies needed to build package xxx.

apt-get build-dep xxx

Or that you could get it to fetch and build the package for you?

Fetch the source code then compile it. (The -b switch means ”build it„.)

apt-get source xxx -b

The result with be a .deb package which you can install using the Debian package manager command:

dpkg -i xxx.deb
Really advanced stuff
apt-get moo

Try it! :)

Audio troubles?

apt

apt-update

:~$ sudo apt-update

apt-cache

:~$ sudo apt-cache search gnumeric
:~$ sudo apt-cache search spreadsheet
:~$ apt-cache search show inkscape
:~$ apt-cache depends python
$ apt-cache show (show is another useful one)

apt-get

:~$ apt-get install gnumeric
:~$ apt-get remove inkscape
:~$ apt-get autoremove

dpkg

search for package using file (like provides)
dpkg -S mpirun
list files in a package
cd /var/cache/apt/archives/
dpkg -c openmpi-bin_1.2.5-1ubuntu1.1_i386.deb

dpkg-deb

update-alternatives

In trying to add openmpi to AUR systems, a problem was encountered because lam-mpi was already installed. Once links have been manually modified, the system, via /var/lib/dpkg/alternatives remembers the change and marks the link as manual. On another system, removal of the /usr/bin/mpirun link caused apt-get remove/install to not create the link either. To fix it, mark the package auto remove and then install it

update-alternatives --auto mpirun
sudo apt-get remove openmpi-bin
sudo apt-get install openmpi-bin

compiz

sudo apt-get install compizconfig-settings-manager

proprietary software

http://www.theregister.co.uk/2010/06/24/reg_linux_guide_3/page2.html

Adobe Flash player, Java, support for MP3, MP4 and mor

sudo apt-get install ubuntu-restricted-extras icedtea6-plugin

Medibuntu

http://www.theregister.co.uk/2010/06/24/reg_linux_guide_3/page2.html

http://medibuntu.org/

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

After this, you can just install the last few bits:

sudo apt-get install app-install-data-medibuntu apport-hooks-medibuntu libdvdcss2 w32codecs

This adds entries for the new toys in the GUI, but more importantly, DVD support and the Windows media codecs. (If you're running 64-bit Ubuntu, use “w64codecs” instead.) Ideally, read the instructions on the Medibuntu site.

aoe/ubuntu.txt · Last modified: 1970/01/18 07:09 by 127.0.0.1