home index sites engineering software hardware email
 

How-To: Ubuntu



About




Official Documentation & Support




Related Sites




dpkg Cheat Sheet


To install a package from a package file (a file ending with '.deb'):

dpkg -i some_package_name.deb

To extract all the files from a package file:

dpkg -X some_package_name.deb /some/dir

To install all packages recursively from a directory:

dpkg -R /some/dir

To remove an installed package (configuration files are not removed):

dpkg -r some_package_name

To purge an installed package (removes everything, including configuration files):

dpkg -P some_package_name

To list partially installed packages:

dpkg -C

To list the contents of a package file:

dpkg -c some_package_name.deb

To show information about a package file:

dpkg -I some_package_name.deb

To display details about an installed package:

dpkg -p some_package_name

To list all installed packages:

dpkg -l

To list packages matching a regular expression:

dpkg -l "*pattern*"

To show the status of a package:

dpkg -s some_package_name

To list files installed from a package:

dpkg -L some_package_name

To search for a filename from installed packages using a regular expression:

dpkg -S "*pattern*"


Tips & Tricks



Solutions for 9 bugs in Ubuntu Hardy 8.04


You can find help to to a number of common problems in Ubuntu Hardy at the Solutions for 9 bugs in Ubuntu 8.04 page.


Hacks for Ubuntu Jaunty 9.04


Jaunty disables the key combination of CTRL+ALT+BACKSPACE as way to restart X. There are several ways to restore that feature, including modifying /etc/X11/xorg.conf to contain the following:

Section "ServerFlags"
   Option "DontZap" "false"
EndSection

Alternatively you can use the key combination of 'right-ALT + PRINTSCREEN + k' to restart X.


Compiz


Here is a good article on getting Compiz working under Ubuntu. Note that Ubuntu Hardy includes Compiz, you simply need to enable it and get the Emerald window manager (plus some nice themes).


Monitor Resolution


If you are having problems with the resolution of your monitor under X check out this page for some useful tips. If you need to reconfigure the display you can run displayconfig-gtk, while to change the resolution of your boot screen edit /etc/usplash.conf then run update-initramfs -u. Some other good tips can be found here.


Fonts!


Get the nice aenigma free fonts from here (source).

Some 'fun' fonts are available from here (source).

More font sites:

To install TTF fonts under Ubuntu:

sudo mkdir /usr/share/fonts/truetype/fontname
sudo cp <font_files> /usr/share/fonts/truetype/fontname
fc-cache -f -v


Managing services


Use 'update-rc.d' to enable/disable a service (see Human-Readable Descriptions of init Scripts for a good list services). For example to disable the service 'servicename' run (you made need to install the sysv-rc-conf package first):

sudo update-rc.d -f servicename remove

To enable the service 'servicename' run:

sudo update-rc.d servicename defaults

Top start or stop a service:

sudo /etc/init.d/servicename start
sudo /etc/init.d/servicename stop

The sysvconfig package contains an ncurses GUI that makes it easy to manage services using the program 'sysvconfig' (you can also use the "Ubuntu BootUp Manager or BUM", installed via the bum package):

sudo sysvconfig

The sysvconfig package also contains the 'service' program that can be use to start or stop a service:

sudo service servicename start
sudo service servicename stop


Resetting the MySQL root password


This allows you to reset the root password for MySQL.

sudo /etc/init.d/mysql reset-password



Adding a PPA repository with a single command


This allows you to add a PPA, just replace PPANAME with the name of the PPA to add (requires the python-software-properties package installed which is only available with 9.10 or later).

sudo add-apt-repository ppa:PPANAME