MetaTrader MT4 or MT5 is a popular application for Forex, commodity, and Metal trading. Here, we will learn how to install it on Linux, such as Ubuntu, Debian, Linux Mint, and others, including Windows.
As we know, MetaTrader 4 or 5 is not natively available for Linux operating systems like Windows, macOS, and Android. Thus, to install MT4 on Linux, we must use WineHQ, a Windows program loader for Linux distros.
MT4 or MT5 installation on Windows 10/8/7 operating systems is the same as any other software available for Microsoft platforms. Just double-click on it and follow the wizard. Therefore, we will discuss installing MT4 or MT5 on Linux in detail.
Steps to Install MT4 or MT5 on Linux, such as Ubuntu 24.04
The steps to install MT4 or MT5 MetaTrader will be the same for all kinds of Linux based on Ubuntu and for Debian, such as Linux Mint, MX Linux, Deepin, and more.
1. Add Wine GPG key and Repo
First, add the GPG key for Wine, which will confirm that the packages we are about to download and install on our system are from a genuine source.
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
After that, according to your Linux system, add one of the repositories given below by copying whole command and pasting in the terminal.
Distribution name | Command |
---|---|
noble Ubuntu 24.04 Linux Mint 22 | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources |
jammy Ubuntu 22.04 Linux Mint 21.x | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources |
focal Ubuntu 20.04 Linux Mint 20.x | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources |
trixie Debian Testing | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/trixie/winehq-trixie.sources |
bookworm Debian 12 | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources |
bullseye Debian 11 | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources |
2. Run Linux system update
Now, run the update command so that the system can rebuild the repository cache and ensure that the installed packages on the system are up to date.
sudo apt update
3. Install Wine on Linux
After all this, we can easily download and install Wine packages for MT4 or MT5 installation on the Linux system. Just run this command:
sudo apt install --install-recommends winehq-stable
Set Prefix
Once the installation is done, run these two commands:
export WINEARCH=win32 export WINEPREFIX=~/.wine32
4. Download MT4 or MT5 Metatrader application on Linux
Go to MetaTrader’s official website and download the MT4 or MT5 Windows version on your Linux system. However, whatever you download from the official website will only install MetaTrader 5. Thus, it is recommended that if you are interested in MT4, you download it from your broker’s website only. MT5 can easily be downloaded from the official one. Here is the link to the website.
Remember– you have to download the Windows version of MT4 or 5.
5. Install MT4 or MT5 on Linux Ubuntu
Go to the Downloads folder where the Windows executable file of MT4 or MetaTrader 5 is located. Right-click on it to select “Open with Other Application.” Then select “Wine Windows program loader” and click the Select button.
![Run Metatrader 4 or 5 on Linux min Run Metatrader 4 or 5 on Linux min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Run-Metatrader-4-or-5-on-Linux-min.png)
![Wine Windows program loader min Wine Windows program loader min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Wine-Windows-program-loader-min.png)
You will get a pop-up for Wine Mono and Gecko installer; click the Install button to set them up.
![Install Wine Mono and Gecko installer min Install Wine Mono and Gecko installer min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Install-Wine-Mono-and-Gecko-installer-min.png)
![Install Mt4 on Linux ubuntu min Install Mt4 on Linux ubuntu min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Install-Mt4-on-Linux-ubuntu-min.png)
![Install MT5 on Linux ubuntu min Install MT5 on Linux ubuntu min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Install-MT5-on-Linux-ubuntu-min.png)
6. Metatrader Linux Desktop shortcut
On the Linux desktop, you will see two desktop shortcuts for MetaTrader. To make them work, right-click on them one by one and select the “Allow Launching” option.
![MT4 Linux destop shortcut min MT4 Linux destop shortcut min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/MT4-Linux-destop-shortcut-min.png)
You will now see the Desktop shortcuts with Metatrader icons.
![Desktop shortcuts min Desktop shortcuts min](https://www.how2shout.com/linux/wp-content/uploads/2021/01/Desktop-shortcuts-min.png)
![MetaTrader MT4 or 5 installation on Linux MetaTrader MT4 or 5 installation on Linux](https://www.how2shout.com/linux/wp-content/uploads/2021/01/MetaTrader-MT4-or-5-installation-on-Linux.png)
Hi, I did the above but my MT4/5 is not installing, all other App’s install fine using Wine, but when i right click MT4/5 and select wine, nothing happens, the cursor will just load for a few seconds and then stop, what am i doing wrong?
Please try command line once- on Terminal- wine app.exe-path
Thank you for the quick response, please see below
root@xxxxx:~# ./wine app.exe-path
-bash: ./wine: No such file or directory
oh sorry my mistake, as wine is already in the path. use only wine not with ./. It will be like – wine app.exe
root@XXXXXXX:~# wine app.exe
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0070:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0070:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0070:err:explorer:initialize_display_settings Failed to query current display settings for L”\\\\.\\DISPLAY1″.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:err:module:process_init L”C:\\windows\\system32\\app.exe” not found
Wine app.exe, here replace app.exe with the path where your mt4 executable file resides.
Hi, I will respond via email
Good evening. Can anyone suggest a good tutorial on how to install multiple instances of MT4 on Linux
Download mt4 from different broker examples- one from Octafx other from IG or forex.com. After that install each of them using this tutorial. This way you will have multiple instances of MT4 on the same Linux machine using Wine.
Found this article searching for help/ I’m having the same issue as the 1st person who commented. I am able to install other apps but MT4 just gives the spinning pinwheel then stops. Any suggestions or help is appreciated.
Um it is asking for proxy settings??