Recent Post

How to Install Wine on Ubuntu 18.04 LTS

Installing Wine On Ubuntu

Step1: Check if you have an Ubuntu 32-bit or 64-bit system

There are different versions of Wine available for 32-bit and 64-bit flavors of Ubuntu. In order to check which version you are using so that you can install the appropriate version of wine, please follow these steps:
Open the Terminal either through Ubuntu Dash or the Ctrl+Alt+T shortcut.
Use the following command to fetch CPU details from the files sysfs and /proc/cpuinfo:
$ lscpu
This command will display the following output:
Check CPU Architecture with lscpu command
The CPU op-mode(s) entry tells you about the flavor of Ubuntu you are running on your system; 32-bit means you are running a 32-bit Linux OS, 32-bit, 64-bit signifies that you are running a 64-bit OS.

Step2: Installing Wine from a Standard Ubuntu Repository (recommended)

We recommend that you install Wine on your system through the standard Ubuntu repository, as this way you can have a more stable version on your system.
Run the following command in the Terminal as a root user in order to install Wine on a 64-bit version of Ubuntu:
$ sudo apt install wine64
Install Wine for 64Bit architecture
Please enter y when you are prompted with a y/n option for installation. After that, the Wine application will be installed and ready for use.
For a 32-bit Ubuntu system, you can use the following command:
$ sudo apt install wine32
You can verify the version of Wine through the following command:
$ wine --version

Alternative: Installing Wine from the WineHQ Repository

The WineHQ repository has a set of standard Wine packages that you can download and install on your system. Please follow these steps to do so:
Run the following command in the Terminal for adding i386 architecture before installing a 64-bit version of Wine:
$ sudo dpkg --add-architecture i386
Add i386 architecture
Run the following in order to add the WineHQ signing key:
$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
Download WineHQ key
Tip: You can copy this command from this tutorial instead of typing it in the Terminal. Select and copy this command from here, right-click in the Terminal prompt and then select Paste from the menu.
Now run the following command in order to add the relevant repository from the WineHQ:
$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'
Add WineHQ package repository
Here you have two options about which release of Wine you want to install; the stable version or the development versions.
  • WineHQ Stable: This is the most recent and stable release of Wine available. Use the following command to install this version:
sudo apt-get install --install-recommends winehq-stable
Install Wine from WineHQ
Please enter Y when prompted with a choice of y/n for installation. After that, the stable version of Wine will be installed on your system.
  • WineHQ Development: This is the most-recent version of Wine but it might not be very stable. As a developer, you might be more interested in installing this version.
sudo apt-get install --install-recommends winehq-devel
Please enter Y when prompted with a choice of y/n for installation. After that, the development version of Wine will be installed on your system.
In order to verify installation and checking which version is installed on your system, run the following command:
$ wine --version
Show Wine version

UnInstalling Wine From Your System

Please enter the following command in your Ubuntu Terminal in order to uninstall Wine from your system:
$ sudo apt-get purge winehq-stable
Uninstall Wine
You will also need remove the following folders manually:
~/.config/wine/ -r

$HOME/.wine

$HOME/.config/menus/applications-merged/wine*

$HOME/.local/share/applications/wine

/.local/share/desktop-directories/wine*

/.local/share/icons/????_*.xpm
The installation will now be completely removed from your system.
By following the steps described in this tutorial, you will be successfully able to install the useful application Wine to your system. It might be the latest release from the Ubuntu Repository or stable/development version from the WineHQ repositories. We have also described the uninstallation process so you can easily remove Wine from your system, be it for new installation or complete removal.

0 Nhận xét