Cài đặt Wine 6.0 trên Ubuntu 20.04

Tóm tắt nội dung

Wine is an open-source compatibility layer that allows you to run Windows applications on Unix-like operating systems such as Linux, FreeBSD, and macOS. Wine is an acronym for “Wine Is Not an Emulator”. It translates Windows system calls into equivalent POSIX calls used by Unix-based operating systems, allowing you to seamlessly integrate Windows programs into your desktop environment.

Installing Wine 5.0 on Ubuntu

The Wine packages are included in the default Ubuntu repositories and can be easily installed with the apt package manager. This is the easiest way to install Wine on Ubuntu. However, the distro version may lag behind the latest release of Wine.

Most of the Windows applications are built for 32-bit architecture. The first step is to enable multiarch, which allows you to install both 64 and 32-bit packages on the machine:

sudo dpkg --add-architecture i386

sudo apt update

Install Wine:

sudo apt install wine64 wine32

Once the installation is complete, verify it by printing the wine version :

wine --version

The current version of Wine available in the Ubuntu 20.04 repositories is 5.0.

wine-5.0 (Ubuntu 5.0-3ubuntu1)

That’s it. Wine has been installed on your machine, and you can start using it.

Installing Wine 6.0 on Ubuntu

In this section, we will provide a step by step instructions about how to install Wine version 6 on Ubuntu 20.04.

If you are running a 64-bit Ubuntu system, enable the 32-bit architecture and update the packages list:

sudo dpkg --add-architecture i386
sudo apt update

Import the WineHQ repository’s GPG key:

wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

Add the WineHQ repository to your system:

sudo apt install software-properties-common
sudo apt-add-repository "deb http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main"

Install Wine by typing:

sudo apt install --install-recommends winehq-stable

This will install a bunch of packages. Once completed, verify the Wine installation by typing:

wine --version

At the time of writing this article, the latest major release of the Wine is version 6.0:

wine-6.0

Wine has been installed and ready to be used.

Configuring Wine

To start configuring Wine, run the winecfg command in your terminal. The command installs Mono and Gecko and sets the Wine environment:

winecfg

A dialog will appear asking whether you want to install the wine-mono package:

Click on the “Install” button, and the installation will start. Once done, a new dialog will appear, prompting you to install Gecko. Again click on the “Install” button.

When the installation is completed, the Wine configuration dialog will be shown. Here you can configure various Wine settings. The default settings should be sufficient in most cases. Once finished, close the dialog box.

Installing Notepad++ on Ubuntu

Now that Wine is installed and configured, we will explain how to install Windows applications on your Ubuntu.

In this tutorial, we’ll show you how to install Notepad++, one of the most popular Windows text editors. Launch your browser and download the installation file from the Notepad++ download page .

Once the download is complete, start the installation by right-clicking on the .exe file and selecting “Open With Wine Windows Program Loader”.

The installation wizard will start, select the language, and install Notepad++ in the same way you would install any application on a Windows computer.

Windows applications are installed in the ~/.wine/drive_c/ directory.

To start the Notepad++ editor navigate to the ~/.wine/drive_c/Program Files (x86)/Notepad++ directory and double click on the notepad++.exe file.

You can also start the application from the Activities search bar.

Conclusion

We’ve shown you how to install Wine on Ubuntu 20.04 desktop and how to install Windows applications.

If you hit a problem or have feedback, leave a comment below.

By: linuxize.com

Wine là gì ?

Wine là một tiện ích chạy các ứng dụng của Windows trong môi trường của Linux.

Chúng ta đều biết Ubuntu (Linux) có kho ứng dụng khá hạn chế so với Windows. Một số ứng dụng nổi bật như Photoshop, Microsoft Office đều có ứng dụng thay thế trên Linux như GIMP, Libre Office. Tuy nhiên còn có khá nhiều ứng dụng trên Windows có mà trên Linux không có.

Wine sinh ra để khắc phục vấn đề này. Nó cho phép chạy ứng dụng Windows trên Linux dễ dàng. Công cụ này sẽ tạo một môi trường để các phần mềm trên Windows có thể tương thích và chạy được trên Linux.

Hướng dẫn cài đặt:

Đầu tiên chúng ta phải bật kiến trúc 32-bit:

# sudo dpkg --add-architecture i386

Cài wine trên ubuntu 20.04

Thêm khóa cho kho lưu trữ Wine :

# wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

Cài đặt Wine trên Ubuntu 20.04

Tiếp theo bật kho lưu trữ cho Wine:

# sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focus main'

Cài đặt wine trên ubuntu 20.04

Cập nhật lại hệ thống:

# sudo apt update

cài đặt Wine trên ubuntu 20.04

Cài đặt Wine:

# sudo apt-get install aptitude

Nhập ‘y’ để tiếp tục:

# sudo aptitude install winehq-stable

Nhập ‘y’ để tiếp tục:

Sau khi cài đặt xong , kiểm tra phiên bản của Wine:

# wine --version

Sử dụng Wine chạy 1 chương trình trên Ubuntu:

Đầu tiền ta tải ứng có đuôi .exe

Chúng ta duy chuyển vào thư mục Downloads:

Tiếp theo để chạy chương trình ta có 2 cách:

Cách 1: Sử dụng lệnh

# wine rufus-3.13.exe

Cách 2: Dùng thao tác chuột

Kích chuột phải chọn Open With Application

Tiếp theo chọn Wine Windows Program Loader và nhấp Select

Tiếp theo nhấn Yes :

Và cuối cùng chúng ta đã cài đặt được 1 chương trình .exe

Kết luận:

Sau khi cài đặt hoàn tất, chúng ta có thể cài các ứng dụng của Windows lên Ubuntu một cách dễ dàng.

Như vậy chúng tôi đã hướng dẫn bạn cách cài đặt Wine 6.0 trên Ubuntu 20.04. Chúc các bạn thành công !

Logo Cloud Việt

Thông Tin Và Hoạt Động Của Chúng Tôi

Cloud Việt là đơn vị cung cấp dịch vụ TTDL uy tín tại Việt Nam. Với tiêu chí là đặt quyền lợi và trải nghiệm của khách hàng lên hàng đầu để  đem đến dịch vụ tốt nhất.

Trụ sở chính

110/20/41 đường số 30, phường 6, quận Gò Vấp, TPHCM

Ngày làm việc

Thứ 2 - Thứ 6, Hàng tuần

Giờ làm việc

08 : 00 AM - 18 : 00 PM

Email

Support@cloudviet.com.vn

Hotline

0972 710 812