Installing Wine on Ubuntu Linux

Wine is a free and open-source compatibility layer that allows you to run Microsoft Windows applications on Unix-like operating systems such as Linux. It is originally an acronym for “Wine Is Not an Emulator”

1.Verify the installed architecture of your system.

For 64-bit:

dpkg –print-architecture

Sample Output:

tux@FreeLinux:~$ dpkg –print-architecture

For 32-bit:

dpkg –print-foreign-architectures

Sample Output:

tux@FreeLinux:~$ dpkg –print-foreign-architectures

Note: If system is a 64-bit, enable the 32 bit architecture using this command:

sudo dpkg –add-architecture i386

2.Download repository key

wget -nc

Sample Output:
tux@FreeLinux:~$ wget -nc–2021-07-17 13:24:57–
Resolving (…
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘winehq.key’
winehq.key 100%[=========================================================>] 3.14K –.-KB/s in 0s
2021-07-17 13:24:57 (48.5 MB/s) – ‘winehq.key’ saved [3220/3220]

3.Install repository key

sudo gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg –dearmor winehq.key

Sample Output:

tux@FreeLinux:~$ sudo gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg –dearmor winehq.key
[sudo] password for tux:

4. Add repository key

sudo add-apt-repository ‘deb focal main’

Depending on your version
Ubuntu 21.04:

sudo add-apt-repository ‘deb hirsute main’

Ubuntu 20.10:

sudo add-apt-repository ‘deb groovy main’

Ubuntu 18.04:

sudo add-apt-repository ‘deb bionic main’

Since I’m using Ubuntu 20.04, here’s the sample output:

tux@FreeLinux:~$ sudo add-apt-repository ‘deb focal main’
Hit:1 stable InRelease
Get:2 focal InRelease [6,257 B]
Get:3 focal/main amd64 Packages [227 kB]
Fetched 1,506 kB in 3s (452 kB/s)
Reading package lists… Done

5. Update the package

sudo apt update

6. Install Wine package

Stable branch:

sudo apt install –install-recommends winehq-stable

Development branch:

sudo apt install –install-recommends winehq-devel

Staging branch:

sudo apt install –install-recommends winehq-staging

Sample Output:

tux@FreeLinux:~$ sudo apt install –install-recommends winehq-stable
Reading package lists… Done
Building dependency tree
Reading state information… Done
After this operation, 1,426 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up wine-stable-i386:i386 (6.0.1~focal-1) …
Setting up wine-stable (6.0.1~focal-1) …
Setting up winehq-stable (6.0.1~focal-1) …
Processing triggers for libc-bin (2.31-0ubuntu9.2) …
Processing triggers for libgdk-pixbuf2.0-0:i386 (2.40.0+dfsg-3ubuntu0.2) …

7.Verify installation

wine –version

Sample Output:
tux@FreeLinux:~$ wine –version

8.Test by installing and running “Windows” program

Example: Notepad++

a. Download via the website or command line


b. Right click the .exe file and select for “Wine Windows Program Loader”

c. Install as per normal via its wizard

c. Run the program

About the author

Free Linux

View all posts

Leave a Reply