如何在Linux上安装Wine Emulator并运行Windows应用程序?

Linux is a very flexible operating system which provides different options for other operating system applications users. Wine is a tool used to run Windows operating system applications like Office, Game, Desktop, Design etc in a Linux distribution like Ubuntu, Debian, Mint, Kali, Fedora, CentOS etc.

Linux是一个非常灵活的操作系统,它为其他操作系统应用程序用户提供了不同的选择。 Wine是一种工具,用于在Linux发行版(如Ubuntu,Debian,Mint,Kali,Fedora,CentOS等)中运行Windows操作系统应用程序,如Office,Game,Desktop,Design等。

什么是酒 (What Is Wine)

Wine is known as an emulator but it describes itself as Wine Is Not an Emulator. Wine is designed to run Windows applications on POSIX compatible operating system Linux, MacOS and BSD. It is mainly called a compatibility layer which will match application system calls with the underlying operating system calls. Wine converts Windows API calls into POSIX calls and prevents disadvantages of other emulations methods.

Wine被称为模拟器,但将自身描述为Wine不是模拟器。 Wine旨在在POSIX兼容操作系统Linux,MacOS和BSD上运行Windows应用程序。 它主要被称为兼容性层,它将应用程序系统调用与基础操作系统调用进行匹配。 Wine将Windows API调用转换为POSIX调用,并避免了其他仿真方法的缺点。

安装Wine Emulator (Install Wine Emulator)

Wine can be installed in different ways like distro repositories or downloading the package from wine site.

Wine可以通过不同的方式进行安装,例如发行版存储库或从wine网站下载软件包。

为Ubuntu,Mint,Kali安装 (Install For Ubuntu, Mint, Kali)

We can install wine for deb based distributions like Ubuntu, Mint and Kali with the following apt command.

我们可以使用以下apt命令为基于Ubuntu,Mint和Kali的基于deb的发行版安装wine。

$ sudo apt install wine
如何在Linux上安装Wine Emulator并运行Windows应用程序?_第1张图片 Install For Ubuntu, Mint, Kali 为Ubuntu,Mint,Kali安装

从酒库安装Ubuntu,Debian,Mint和Kali(Install For Ubuntu, Debian, Mint and Kali From Wine Repositories)

If we want to install the latest version which is provided by the Wine we need to add Wine repositories to the current distribution.

如果我们要安装Wine提供的最新版本,则需要将Wine存储库添加到当前发行版中。

If our system is 64 bit we need to enable the 32-bit library by adding i386 architecture to the dpkg.

如果我们的系统是64位,则需要通过在dpkg中添加i386架构来启用32位库。

$ sudo dpkg --add-architecture i386

Then we will add Wine repository key for security reasons

然后出于安全原因,我们将添加Wine仓库密钥

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

and as the last thing, we will add the repository for the given Ubuntu or related distribution version.

最后,我们将为给定的Ubuntu或相关发行版添加存储库。

For this version: Use this command:
Ubuntu 18.10 sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main’
Ubuntu 18.04Linux Mint 19.x sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’
Ubuntu 16.04Linux Mint 18.x sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’
Ubuntu 14.04Linux Mint 17.x sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ trusty main’
对于此版本: 使用此命令:
Ubuntu 18.10 sudo apt-add-repository'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
Ubuntu 18.04 Linux Mint 19.x sudo apt-add-repository'deb https://dl.winehq.org/wine-builds/ubuntu/bionic main'
Ubuntu 16.04 Linux Mint 18.x sudo apt-add-repository'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
Ubuntu 14.04Linux Mint 17.x sudo apt-add-repository'deb https://dl.winehq.org/wine-builds/ubuntu/ trusty main'
LEARN MORE  What Is An Emulator?
了解更多什么是仿真器?

Wine repository provides 3 main branch where the stable is suitable for most cases.

酒库提供3个主要分支,其中马stable适合大多数情况。

Stable branch
sudo apt install --install-recommends winehq-stable

Development branch
Staging branch
sudo apt install --install-recommends winehq-staging
稳定的分支
开发部
sudo apt install --install-recommends winehq-devel
暂存分支

为Fedora,CentOS,RedHat安装 (Install For Fedora, CentOS, RedHat)

We can install wine from official Fedora, CentOS and RedHat repositories with the following command.

我们可以使用以下命令从Fedora,CentOS和RedHat官方存储库安装Wine。

$ sudo yum install wine
如何在Linux上安装Wine Emulator并运行Windows应用程序?_第2张图片 Install For Fedora, CentOS, RedHat 为Fedora,CentOS,RedHat安装

从酒库中安装Fedora,CentOS,RedHat(Install For Fedora, CentOS, RedHat From Wine Repositories)

Wine also provides repositories for the latest version. First, we will add Wine repository with the following command.

Wine还提供最新版本的存储库。 首先,我们将使用以下命令添加Wine仓库。

$ dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/28/winehq.repo

Then we will install wine with the following dnf package manager.

然后,我们将使用以下dnf软件包管理器安装wine。

使用Wine安装Windows应用程序 (Install Windows Application with Wine)

We will download the Notepad++ installer executable from the following link.

我们将从以下链接下载Notepad ++安装程序可执行文件。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第3张图片 Install Windows Application with Wine 使用Wine安装Windows应用程序
https://notepad-plus-plus.org/repository/7.x/7.6.3/npp.7.6.3.Installer.exe

And we will start the installation with the wine by just providing the executable name with a path like below.

我们将通过为可执行文件名提供如下路径来开始安装wine。

$ wine npp.7.6.3.Installer.exe
如何在Linux上安装Wine Emulator并运行Windows应用程序?_第4张图片 Install Windows Application with Wine 使用Wine安装Windows应用程序

We will see the following Windows style Notepad installation screen.

我们将看到以下Windows样式的记事本安装屏幕。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第5张图片 Next Next 下一个下一个

Wine配置和已安装文件(Wine Configuration and Installed Files)

After finishing the installation wine will create some configuration files. There will be also installed application executable, dll, etc. files. All these files are stored in the users home directory .wine folder.We can list the content with the ls command like below.

安装完成后,wine将创建一些配置文件。 还将安装应用程序可执行文件,dll等文件。 所有这些文件都存储在用户的主目录.wine夹中。我们可以使用ls命令列出内容,如下所示。

$ ls /home/ismail/.wine
Wine Configuration and Installed Files Wine Configuration and Installed Files Wine配置和已安装文件

We can see that there are drive_c dosdevices and registry files like system.reg , userdef.reg, user.reg .

我们可以看到,有drive_c dosdevices和像注册表文件system.reguserdef.reguser.reg

  • `drive_c` is used to emulate classical Windows C drive where directories like Program Files, ProgramData, users, Windows are stored.

    drive_c用于模拟经典的Windows C驱动器,其中存储了程序文件,ProgramData,用户,Windows等目录。

Wine configuration can be opened with the winecfg command which will provide configuration about Applications, Libraries, Drives etc.

可以使用winecfg命令打开Wine配置,该命令将提供有关应用程序,库,驱动器等的配置。

应用领域 (Applications)

Windows operating systems have different versions where some applications can work specific version. We can specify the application and working version with the Windows Version select box like below. We can also specify the default Windows version we want to emulate

Windows操作系统具有不同的版本,其中某些应用程序可以使用特定的版本。 我们可以使用Windows版本选择框指定应用程序和工作版本,如下所示。 我们还可以指定要模拟的默认Windows版本

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第6张图片 Applications 应用领域

图书馆(Libraries)

Dynamically Link Libraries can be specified individually to be either builtin (provided by Wine) or native (taken from Windows or provided by the application)

动态链接库可以单独指定为内置(由Wine提供)或本机(从Windows获取或由应用程序提供)

LEARN MORE  How To Create Snapshot of KVM / Libvirt / Qemu Vm?
了解更多信息如何创建KVM / Libvirt / Qemu Vm的快照?
如何在Linux上安装Wine Emulator并运行Windows应用程序?_第7张图片 Libraries 图书馆

图形(Graphics)

We ca also specify the Graphics settings like automatically capture the mouse in full screen, allow the windows manager to decorate the windows etc. We can also specify screen resolution in dpi which is 96 dpi in this example.

我们还可以指定图形设置,例如自动全屏捕获鼠标,允许Windows管理器装饰窗口等。在此示例中,我们还可以以dpi指定屏幕分辨率,即dpi为96 dpi。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第8张图片 Graphics 图形

桌面整合(Desktop Integration)

Desktop related configuration can be done in the Desktop Integration pane where we can specify the Theme, Install Theme, Folders etc.

与桌面相关的配置可以在“桌面集成”窗格中完成,我们可以在其中指定主题,安装主题,文件夹等。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第9张图片 Desktop Integration 桌面整合

驱动器(Drives)

As all applications use partitions and drives to store binary files, dll’ and other data. We can specify the partitions from the drives menu change current drive or add and remove drives. Drives are matched to the target folder. By default C:  drive is targeted to the drive_c

由于所有应用程序都使用分区和驱动器来存储二进制文件,dll'和其他数据。 我们可以从驱动器菜单中指定分区,以更改当前驱动器或添加和删除驱动器。 驱动器与目标文件夹匹配。 默认情况下,C:驱动器以drive_c为目标

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第10张图片 Drives 驱动器

音讯(Audio)

In audio part we can specify different devices for Output, Video Output, Input, Video Input etc. We can also test the current audio configuration from the Test Sound button.

在音频部分,我们可以为输出,视频输出,输入,视频输入等指定不同的设备。我们还可以从“ Test Sound按钮测试当前的音频配置。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第11张图片 Audio 音讯

分期(Staging)

Staging pane will provide settings that are experimental and may break stuff. Make sure to reset them again in case of a problem.

暂存窗格将提供实验性设置,可能会破坏内容。 如果出现问题,请确保再次重置它们。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第12张图片 Staging 分期

关于(About)

This part provides information about the Wine tool. Also, we can set Windows registration information like Owner and Organization from this tab.

这部分提供有关Wine工具的信息。 另外,我们可以从此选项卡设置Windows注册信息,例如所有者和组织。

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第13张图片 About 关于

列出Wine支持的Windows应用程序(List Wine Supported Windows Applications)

Wine has a great user base were supported and unsupported applications are documented regularly. Wine application database can be accessed from the following link  https://appdb.winehq.org/ . We can also see that there is a Top-10 Platinum List where most efficient and compatible applications and especially games are listed

Wine支持良好的用户群,并且不定期记录不支持的应用程序。 可以从以下链接https://appdb.winehq.org/访问Wine应用程序数据库。 我们还可以看到有一个Top-10白金榜,其中列出了最高效和兼容的应用程序,尤其是游戏

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第14张图片 List Wine Supported Windows Applications 列出Wine支持的Windows应用程序

如何在Linux上安装Wine Emulator并运行Windows应用程序? 信息图 (How To Install Wine Emulator On Linux and Run Windows Applications? Infographic)

如何在Linux上安装Wine Emulator并运行Windows应用程序?_第15张图片 How To Install Wine Emulator On Linux and Run Windows Applications? Infographic 如何在Linux上安装Wine Emulator并运行Windows应用程序? 信息图
LEARN MORE  Linux KVM Libvirt Tutorial
了解更多Linux KVM Libvirt教程

翻译自: https://www.poftut.com/how-to-install-wine-emulator-on-linux-and-run-windows-applications/

你可能感兴趣的:(linux,git,windows,java,ubuntu)