How to install MT4 on Ubuntu Linux and Windows (MetaTrader 4)

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 nameCommand
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 locatedRight-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

Wine Windows program loader min

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 Mt4 on Linux ubuntu min
Install MT5 on Linux ubuntu min

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

You will now see the Desktop shortcuts with Metatrader icons.

Desktop shortcuts min
MetaTrader MT4 or 5 installation on Linux

11 thoughts on “How to install MT4 on Ubuntu Linux and Windows (MetaTrader 4)”

  1. 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?

    Reply
  2. Thank you for the quick response, please see below
    root@xxxxx:~# ./wine app.exe-path
    -bash: ./wine: No such file or directory

    Reply
  3. 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

    Reply
    • 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.

      Reply
  4. 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.

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.