Debian and Debian-based distributions, such as Ubuntu, utilize a special tool for managing packages known as APT. APT is able to automagically install all of the needed dependencies for a software package, as well as keep the package up to date, by scanning what are known as APT repositories. Debian-based distributions have their own repositories of software, many of which include Wine, however we keep our own repository of the latest available packages here for download.
There used to be graphical instructions here, however we have found that the terminal commands are actually simpler to describe and quicker for the user to input. Because the commands below use sudo, you may have to enter your user password after hitting enter.
Adding the WineHQ APT Repository:
First, open a terminal window. Then add the repository's key to your system's list of trusted APT keys by copy and pasting the following:
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
Next, add the repository to your system's list of APT sources:
For Ubuntu Gutsy (7.10):
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/winehq.list
For Ubuntu Feisty (7.04):
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list
For Ubuntu Edgy (6.10): *64-bit packages not available*
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/edgy.list -O /etc/apt/sources.list.d/winehq.list
For Ubuntu Dapper (6.06): *64-bit packages not available*
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/dapper.list -O /etc/apt/sources.list.d/winehq.list
For Debian Etch (4.0): *64-bit packages not available*
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/etch.list -O /etc/apt/sources.list.d/winehq.list
Then, you can install Wine from WineHQ like it were any other package, such as by using the Synaptic Package Manager under System->Administration. Alternatively, you can install from the terminal by running 'sudo apt-get update' to update APT's package information and then 'sudo apt-get install wine'.
Upgrading to a new version of Ubuntu
If you are upgrading the entire system, such as going from Ubuntu 7.04 to 7.10, you will need to come back to this page and enter the command for the new version above. The built in update manager will not switch the Wine repository automatically.
64-bit Users:
If you are using a very old version of Ubuntu where 64 bit packages are not available and would still like a working Wine package, there is a relatively easy hack that can be used to install the 32-bit package and have it function normally. See this page on the Wine wiki for more details.
Older .deb packages
Since the APT repository can only hold the latest packages, older versions of the packages are available at the WineHQ .deb packages archive.
You can install the packages by double-clicking on them.