Русский 中文 Español Deutsch 日本語 Português 한국어 Français Italiano Türkçe
MetaTrader 5 on Linux

MetaTrader 5 on Linux

MetaTrader 5Trading | 18 January 2013, 07:18
416 216 87

In this article, we demonstrate how to install MetaTrader 5 on popular Linux versions, Ubuntu and Debian. These systems are widely used on companies’ server hardware as well as on traders’ personal computers.

Installing the platform with one command

MetaTrader 5 runs on Linux using Wine. Wine is a free compatibility layer that allows application software developed for Microsoft Windows to run on Unix-like operating systems.

We have prepared a special script to make the installation process as simple as possible. The script will automatically detect your system version, based on which it will download and install the appropriate Wine package. After that, it will download and run the platform installer.

To start the installation, open the command line (Terminal) and specify the relevant command:

For Ubuntu:

wget ; chmod +x ; ./

For Debian:

wget ; chmod +x ; ./

This command downloads the script, makes it executable and runs it. You only need to enter your account password to allow installation.

Installing Wine and MetaTrader 5 with a single command

If you are prompted to install additional Wine packages (Mono, Gecko), please agree, as these packages are required for platform operation. The MetaTrader 5 installer will launch after that. Once you complete the standard steps, the platform is ready to go.

The MetaTrader 5 platform is ready to run on Linux

Install updates in a timely manner

It is highly recommended to always use the latest versions of the operating system and Wine. Timely updates increase platform operation stability and improve performance.

To update Wine, open a command prompt and type the following command:

sudo apt update ; sudo apt upgrade

For further information, please visit the official Wine website.

MetaTrader 5 Data Directory

Wine creates a separate virtual logical drive with the necessary environment for every installed program. The default path of the installed terminal data folder is as follows:

Home directory\.mt5\drive_c\Program Files\MetaTrader 5

Use MetaTrader 5 on Linux: install with a single command and enjoy all the platform features.

Translated from Russian by MetaQuotes Ltd.
Original article:

Last comments | Go to discussion (87)
Paul | 20 Dec 2022 at 00:14
Using wine-devel or wine-staging instead of wine-stable solves the issue
AMI289 | 30 Dec 2022 at 23:47
Adegbenga Omotowoju #:
hi team please can any help, i'm having issues with my mt5 terminal [ Always closing itself ]

Same here.

Running with WINE on ubuntu system.

Sunfire | 5 Feb 2023 at 13:06
Does this works in ARM Linux??
ian kipkemei
ian kipkemei | 15 Mar 2023 at 15:10
i need help on the last part of data directory guys how do u go about that
fb.hikmawan | 3 Jun 2023 at 14:05

Unfortunately, on the date that I posted this, the Debian script was not worked for Debian 11 Bullseye

I noticed that there is a code line need to be modified.

You can make your own shell script by using your text editor first.


Then, type/insert below lines.


# Copyright 2022, MetaQuotes Ltd.
# edited 2023, Fatchul Bari Hikmawan.

# MetaTrader download url
# Wine version to install: stable or devel

# Prepare: switch to 32 bit and add Wine key
sudo dpkg --add-architecture i386
wget -nc
sudo mkdir /etc/apt/keyrings
sudo mv winehq.key /etc/apt/keyrings/winehq-archive.key

# Get Debian version and trim to major only
OS_VER=$(lsb_release -r |cut -f2 |cut -d "." -f1)
# Choose repository based on Debian version
if (( $OS_VER >= 12)); then
  wget -nc
  sudo mv winehq-bookworm.sources /etc/apt/sources.list.d/
elif (( $OS_VER < 12 )) && (( $OS_VER >= 11 )); then
  wget -nc
  sudo mv winehq-bullseye.sources /etc/apt/sources.list.d/
elif (( $OS_VER <= 10 )); then
  wget -nc
  sudo mv winehq-buster.sources /etc/apt/sources.list.d/

# Update package and install Wine
sudo apt update
sudo apt upgrade
sudo apt install --install-recommends winehq-$WINE_VERSION

# Download MetaTrader
wget $URL

# Set environment to Windows 10
WINEPREFIX=~/.mt5 winecfg -v=win10
# Start MetaTrader installer
WINEPREFIX=~/.mt5 wine mt5setup.exe

Save the shell script, then make it executable

chmod +x


Finally you can install the Metatrader 5 on Debian 11 Bullseye.



If MetaQuotes's admin read this post, the failure is because winehq repository sources are looking the public key to directory `/etc/apt/keyrings` instead of `/usr/share/keyrings`.

So we need to pass it to correct directory in order the winehq can be installed successfully.

Neural Networks: From Theory to Practice Neural Networks: From Theory to Practice
Nowadays, every trader must have heard of neural networks and knows how cool it is to use them. The majority believes that those who can deal with neural networks are some kind of superhuman. In this article, I will try to explain to you the neural network architecture, describe its applications and show examples of practical use.
MetaTrader 5 on Mac OS MetaTrader 5 on Mac OS
Apple products have become very popular. MetaQuotes Software Corp. attentively follows the progress of the IT industry and has already released the special mobile applications for iOS-based devices - MetaTrader 4 for iPhone and MetaTrader 5 for iPhone. There are many topics on forum, where people are seeking a solution for running MetaTrader 5 under Mac OS operating system. In this article, you will find out how to work with MetaTrader 5 via the Apple's popular operating system.
Order Strategies. Multi-Purpose Expert Advisor Order Strategies. Multi-Purpose Expert Advisor
This article centers around strategies that actively use pending orders, a metalanguage that can be created to formally describe such strategies and the use of a multi-purpose Expert Advisor whose operation is based on those descriptions
General information on Trading Signals for MetaTrader 4 and MetaTrader 5 General information on Trading Signals for MetaTrader 4 and MetaTrader 5
MetaTrader 4 / MetaTrader 5 Trading Signals is a service allowing traders to copy trading operations of a Signals Provider. Our goal was to develop the new massively used service protecting Subscribers and relieving them of unnecessary costs.