在Linux上运行Exe文件

Question 1

Question 1 的 5:
.exe文件能在Linux上运行吗?

WH.shared.addScrollLoadItem(‘836dd90fe53c47e52cd260e4fcf345f5’)

WH.performance.clearMarks(‘image1_rendered’); WH.performance.mark(‘image1_rendered’);{“smallUrl”:”https://www.wikihow.com/images_en/thumb/5/5b/Can-Linux-Run-Exe-Step-1-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-1-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/5/5b/Can-Linux-Run-Exe-Step-1-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-1-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
1
是的,借助免费软件Wine,你就能在Linux上运行.exe文件。Wine会在操作系统(Linux)和文件(为Windows编写)之间充当一个兼容层。
X
研究来源

它是在非Windows环境下运行.exe文件的唯一方法。[2]
X
研究来源

由于.exe文件是Windows操作系统的原生文件,所以要运行它们,你就必须得有一个兼容层(如Wine)或通过Windows模拟器来模拟Windows(这样也意味着你不是在单独使用Linux了)。
WH.performance.mark(‘step1_rendered’);

广告

WH.ads.addBodyAd(‘mobilemethod_ad_1’)

Question 2

Question 2 的 5:如何下载Wine?

WH.shared.addScrollLoadItem(‘ecb119c3843b9b97d1d6e432497e4860’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/2/23/Can-Linux-Run-Exe-Step-2-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-2-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/2/23/Can-Linux-Run-Exe-Step-2-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-2-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
1
打开Linux终端并逐一输入这些命令。首先是更新Linux内核库。要执行这一步,输入sudo apt update并按↵ Enter。出现提示时,输入密码并按↵ Enter。然后,在出现提示时输入clear并按↵ Enter。现在,你就可以输入命令来下载Wine了:[3]
X
研究来源

sudo apt-get install wine并按↵ Enter

sudo apt-get install wine32并按↵ Enter

sudo apt-get install libwine并按↵ Enter

尽管终端可能有点让人望而生畏,但不用担心!你不太可能弄坏任何东西。因为你所要做的,就是照着执行这些命令。

Question 3

Question 3 的 5:如何在Linux上运行.exe?

WH.shared.addScrollLoadItem(‘520a74e1f87dc71a1e3282541bd67ce9’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/39/Can-Linux-Run-Exe-Step-3-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-3-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/39/Can-Linux-Run-Exe-Step-3-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-3-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
1
浏览到包含该文件的目录,然后用Wine打开它。在终端中,通过命令cd 浏览到包含该文件的目录。[4]
X
研究来源

然后,通过wine .exe命令来运行文件。比如,文件example.exe保存在桌面上,那就通过下面的命令来执行操作:[5]
X
研究来源

cd Desktop/并按↵ Enter

wine example.exe并按↵ Enter

广告

WH.ads.addBodyAd(‘mobilemethod_ad_3’)

Question 4

Question 4 的 5:如何在Linux上运行Windows软件?

WH.shared.addScrollLoadItem(‘2db7e08e8e712045e4914bcd50fd6f88’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/2/2c/Can-Linux-Run-Exe-Step-4-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-4-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/2/2c/Can-Linux-Run-Exe-Step-4-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-4-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
1
对单个应用程序使用Wine。这是在非Windows环境下运行为Windows开发的软件的唯一选择。Wine是一个开源免费软件,它只会重新构建运行Windows程序所需的基本Windows环境。因此,通过Wine运行软件可能会遇到更多的错误,并且性能也可能会下降。[6]
X
研究来源

WH.shared.addScrollLoadItem(‘d0477fd5fed4cdc8ef345b4379364375’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/15/Can-Linux-Run-Exe-Step-5-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-5-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/15/Can-Linux-Run-Exe-Step-5-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-5-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
2
选择使用虚拟机,这样能略微提升性能。虚拟机也是一种程序,它们能在自己的窗口中运行一个完整的Windows副本。这种方法比通过Wine来运行应用程序的错误会少一些,因为就技术而言,这样是在它原本的环境(Windows)下运行应用程序。但缺点也很明显,那就是你得同时运行两个操作系统(Linux和Windows),所以可能会拖累电脑性能。[7]
X
研究来源

常用的虚拟机包括:VirtualBox、VMware和Linux内置的KVM(基于内核的虚拟机)。[8]
X
研究来源

由于同时运行Linux和Windows所需的计算能力,这种方法对于像微软Office这样的生产力应用程序非常有效,但不太适合像视频游戏这样的图形/计算密集型程序。

WH.shared.addScrollLoadItem(‘7f1000973902068b6ce23928818629ab’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/43/Can-Linux-Run-Exe-Step-6-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-6-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/43/Can-Linux-Run-Exe-Step-6-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-6-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
3
利用双系统来运行Windows游戏和复杂应用程序。双系统意味着你得重启电脑,然后进入Windows中,这样应用程序就可以在原本的环境中运行。这种方法最适用于对性能要求较高的游戏或应用程序。但是,这也意味着每次要运行Windows软件时都必须重启电脑。[9]
X
研究来源

广告

WH.ads.addBodyAd(‘mobilemethod_ad_4’)

Question 5

Question 5 的 5:
.exe相当于Linux中的什么?

WH.shared.addScrollLoadItem(‘2c590b74555ceafd408b6cd3eda2fd1a’)

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/b3/Can-Linux-Run-Exe-Step-7-Version-2.jpg/v4-460px-Can-Linux-Run-Exe-Step-7-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/b3/Can-Linux-Run-Exe-Step-7-Version-2.jpg/v4-728px-Can-Linux-Run-Exe-Step-7-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”

“}
1
Linux中并没有和.exe直接对应的东西。对于Windows而言,.exe表示一个可执行文件,这意味着操作系统可以运行这个文件。Linux不使用文件扩展名来表示哪些文件是可执行的。相反,它是用权限来表示的,而基本权限包括读r、写w和执行x。权限就决定了哪些文件是可执行的。[10]
X
研究来源

因此,Linux文件可以有不同的扩展名(比如:.sh}),或者即使没有文件扩展名但仍然可以执行。[11]
X
研究来源

下面是更改文件权限和运行文件的方法:[12]
X
研究来源

在命令行中输入chmod +x file-name.run,将文件权限更改为“可执行”。
输入./file-name.run以执行文件。
如果弹出错误消息,输入sudo ./file-name.run。输入sudo就能以管理员身份运行文件了。但要小心,因为通过sudo能对系统进行更改。
软件安装通常会要求你输入sudo。


已发布

分类

作者:

标签

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注