Install
- Verify if it is a 64-bit architecture
dpkg --print-architecture
- return
amd64
- Check if 32-bit architecture is installed
dpkg --print-foreign-architectures
- If displayed
i386
, skip this step, otherwise execute
sudo dpkg --add-architecture i386
- double check
dpkg --print-foreign-architectures
- Download and add the WineHQ repository key
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
-
Select the sources files you need to use as needed
- Use official sources
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
- Use the domestic source code to edit the file
/etc/apt/sources.list.d/winehq-jammy.sources
and write the following content in the file
Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/wine-builds/ubuntu Suites: jammy Components: main Architectures: amd64 i386 Signed-By: /etc/apt/keyrings/winehq-archive.key
Other versions are expected to modify the
Suites
and.sources
fields of thejammy
file name. Please refer to the version code below. Figure
-
Update database
sudo apt update
- Install Wine
sudo apt install winehq-stable # 安装稳定版(推荐)
sudo apt install winehq-devel # 安装开发版
sudo apt install winehq-staging # 安装暂存版(开发版的开发版,不知道怎么翻译比较合适)
Instructions
- Place the Windows program in any directory and enter the directory in the terminal
- Execute
wine
Install or use any Windows program
wine xxxx.exe
- Manual use or installation Programs that require the .NET Framework will be installed automatically
Wine Mono
Frequently Asked Questions
-
Missing fonts or incorrect layout
- Find a win computer, find
C:/Windows/fonts/
, right-click the sort method type, copy the.ttf
and.ttc
files to linux Download and enter the directory. - Copy the ttf and ttc files to the
/usr/share/fonts/
folder under Linux.
The font cannot be found because the ttf is incomplete
The paragraph format is disordered because the ttc is incompletesudo cp ./*.ttf /usr/share/fonts/
sudo cp ./*.ttc /usr/share/fonts/
- Generate font index information:
sudo mkfontscale sudo mkfontdir
- Update font cache:
sudo fc-cache
- Find a win computer, find
-
The problem of garbled Chinese interface when the system default language is not Chinese can be solved through
env LANG=zh_CN.UTF-8 wine xxxx.exe
Run the corresponding program to solve the problem
-
The COM port corresponding to USB to serial port can be viewed through the command in
~/.wine/dosdevices
. The following serial port uses COM33:ll
-
The USB to serial port cannot be opened. The serial port permissions need to be configured. Udev processing can be configured. The specific operation process is as follows:
- Create a rules file in
/etc/udev/rules.d
(skip this step if you want to write to an existing rules file)
sudo gedit /etc/udev/rules.d/70-persistent-usb.rules
- Add the following content to the file
KERNEL=="ttyUSB[0-20]*",MODE="0666"
- Reload udev service
sudo service udev reload
- Restart udev service
sudo service udev restart
- Create a rules file in
Reference connection:
[1]. https://wine.htmlvalidator.com/install-wine-on-ubuntu-22.04.html
[2]. http://www.zztongyun.com/article/yum%E6%9B%B4%E6%8D%A2%E5%9B%BD%E5%86%85%E6%BA%90