CSS HTML Validator – Install on Linux

Debian 9 Stretch

Header Image

About Wine

If you are not familiar with Wine (or maybe even if you are), you may find the article Understanding Wine helpful.

A more complete reference is the WineHQ Wine User's Guide.New Window Icon



WineHQ news, including Wine versionsNew Window Icon

Binary packages available from WineHQ, with links to the binariesNew Window Icon

Debian packages and installation instructionsNew Window Icon

Debian Wiki's page for WineNew Window Icon


All Terminal commands in this document have been validated by copy/paste from this document into a Terminal window and executed. Consider arranging your browser window and your Terminal window side by side in order to copy/paste the Terminal commands.

Start here: Prepare Debian to Install Wine

The default graphical installation of Debian does not include some features that are prerequisite to installing Wine. Missing are sudo and apt-transport-https, and Debian will attempt to obtain those packages from a CD or DVD, unless that is disabled, so begin by disabling local repositories on optical disks.

Open a Terminal window, login as root (because sudo may not have been installed), and — in case something goes wrong — backup sources.list.

$ su -l
# cp /etc/apt/sources.list /etc/apt/sources.list.BAK

Using nano (or any other command-line text editor) open sources.list for editing.

# nano /etc/apt/sources.list

Insert a # as the first character in the entry for cdrom. This makes the entry for cdrom a comment that will be ignored. After the # is inserted, the line will look like this.

# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main

When done, save the file (Ctrl-o), confirm the filename is to remain unchanged, and close nano (Ctrl-x).

Do the following. Ignore any complaints issued by apt-get update.

# apt-get update
# apt-get install sudo
# apt-get install apt-transport-https

Do the following to grant sudo to yourself.

# adduser your-user-name sudo

Exit Terminal and close any open apps

Restart your computer, in order to activate sudo for your user name. When logged in again, continue from here to verify sudo works.

-------- Waiting for computer to re-boot --------

To verify sudo works, open a terminal session and issue the following command.

$ sudo echo 'Hello'

The test is successful if, after asking and receiving your password, "Hello" is displayed.

Add repository and install Wine

See if 32-bit architecture is already installed. The following command should respond with "i386"

$ dpkg --print-foreign-architectures

If it does not display "i386", execute the following.

$ sudo dpkg --add-architecture i386

Re-check with

$ dpkg --print-foreign-architectures

Get and install the repository key.

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
$ sudo apt-key add winehq.key

To add the Wine HQ repository for Debian 9 Stretch to the operating system's list of repositories, create file winehq.list and install it into folder /etc/apt/sources.list.d

$ echo 'deb https://dl.winehq.org/wine-builds/debian/ stretch main' > /tmp/winehq.list
$ sudo cp /tmp/winehq.list /etc/apt/sources.list.d/
$ rm /tmp/winehq.list

Update packages

$ sudo apt update

Install Wine-Stable.

$ sudo apt install --install-recommends winehq-stable

If apt complains about missing dependencies, install them, then repeat the last two steps (sudo apt update and sudo apt install).

Verify the installation succeeded.

$ wine --version

Remote file


was not found.

Remote file


was not found.