MetaTrader 4 on Linux

MetaQuotes | 23 November, 2012

In this article, we demonstrate how to install MetaTrader 4 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 4 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 https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4ubuntu.sh ; chmod +x mt4ubuntu.sh ; ./mt4ubuntu.sh

For Debian:

wget https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4debian.sh ; chmod +x mt4debian.sh ; ./mt4debian.sh

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 4 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 4 installer will launch after that. Once you complete the standard steps, the platform is ready to go.

The MetaTrader 4 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 4 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\.mt4\drive_c\Program Files\MetaTrader 4


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