MetaTrader 5 on Linux: The Official Script, Step by Step
MetaTrader 5 has no native Linux build. It runs on Linux the way a Windows program runs on Linux, inside a compatibility layer, and MetaQuotes publishes a script that builds that layer and installs the platform inside it from a single command line.
The download is rarely the part that fails. What fails is the privilege the script is run with, the two extra packages the installer asks for partway through, and the folder the platform ends up living in, which is not where a Linux user would think to look.
Four routes put MetaTrader on a Linux desktop and they do not suit the same person. This page works through the official one in the order it happens, and says what the other three cost.
Key takeaways
- MetaQuotes documents one supported install path for Linux: a script that detects the distribution, installs the matching Wine package, then runs the platform installer.
- The official instruction is to open the terminal without administrator privileges. The script asks for the account password itself at the point it needs it.
- The installer stops partway through to ask for two additional Wine packages, Mono and Gecko. MetaQuotes states both are required for the platform to operate.
- The platform does not live under your usual application directories. It lives inside a Wine drive in the home folder, at a path beginning with .mt5, and that is where logs, templates and expert advisors are.
- MetaQuotes publishes no minimum Wine version for Linux. The only Wine version number it publishes, 8.0.1, appears in its macOS guidance, so a specific Linux minimum quoted elsewhere does not come from the Linux documentation.
Table of contents
- Four Ways to Run MetaTrader on Linux, and Who Each One Suits
- Why There Is No Native Linux Build
- The Official Script, and the One Privilege It Must Not Have
- The Two Wine Packages the Installer Asks For
- Where Linux Actually Keeps Your Platform Files
- Checking Which Wine Version You Ended Up With
- What Breaks After a Distribution Upgrade
- Who This Page Is Not For
Four Ways to Run MetaTrader on Linux, and Who Each One Suits
Install guides tend to present one method and stop, which leaves the reader unable to tell whether they picked the right one or the only one the writer knew. There are four, and the choice is made before any download begins.
The official script is the route MetaQuotes documents and the only one it supports. Setting up Wine yourself and running the Windows installer by hand reaches the same place, but you own every version decision the script would have made. A rented server or a hosted terminal moves the platform off the Linux machine entirely, so nothing is installed locally and the desktop can be switched off. The browser terminal installs nothing at all.
Automated trading changes the weighting. Expert advisors, custom indicators and templates are files, and files live wherever the platform was installed, so the two local routes are the ones that put them on the Linux machine. If the same question brought you here about an Apple machine instead, the macOS installer answers it separately, with its own paths and its own system requirements.
| Route | What you install locally | Root access needed | Who it suits |
|---|---|---|---|
| Official MetaQuotes script | Wine, chosen by the script, plus the platform | No, per the documented instruction | Ubuntu, Debian, Linux Mint and Fedora users who want the supported path |
| Manual Wine setup | Wine from your own repositories, plus the platform | Yes, for the package installation step | Distributions the script does not detect, or a Wine version you want to pin |
| Rented server or hosted terminal | Nothing | No | Anyone who needs the terminal running while the desktop is off |
| Browser terminal | Nothing | No | Occasional access, or a machine you are not allowed to install software on |
Why There Is No Native Linux Build
MetaQuotes states the position plainly: the platform runs on Linux using Wine. There is no separate Linux binary to download, and the script does not build one. What it produces is a Windows environment on the Linux machine with the Windows platform installed inside it.
That has one consequence worth holding on to before anything is installed. Every path the platform reports, every folder it writes to and every file dialogue it opens belongs to that Windows environment, not to your Linux filesystem. A terminal that reports it saved something to a drive letter has saved it somewhere real, but not anywhere the Linux side names that way.
The mechanics of a compatibility layer are the same on any operating system, and they are set out in more detail on the page about moving the platform to another machine, where the same divide between the installation and the data decides what actually has to travel.
The Official Script, and the One Privilege It Must Not Have
The documented instruction has a detail in it that install guides drop: open the command line without administrator privileges. No sudo.
What MetaQuotes publishes is one command line holding three steps in sequence. It fetches the install script from the download servers of the vendor, marks that file executable, and runs it. Take the current link from the MetaTrader 5 site or from the Help menu of an installed platform, which is where MetaQuotes says it is published, rather than from a copy pasted into a guide that may have gone stale.
Root is not absent from the process. The script needs it to install the Wine package, and it asks for the account password at that moment. The difference is who holds the privilege.
A script started as a normal user requests root for the step that needs it. A script started under sudo runs everything as root, including the parts that create the Wine environment, and that environment belongs to whichever account created it.
The script detects the system and supports Ubuntu, Debian, Linux Mint and Fedora. On those it selects the Wine package itself, then downloads and launches the platform installer, which proceeds through the standard Windows steps. MetaQuotes instructs a restart of the operating system once installation finishes.
This route assumes the terminal runs on the machine in front of you. Where it has to keep running after that machine is switched off, virtual hosting is the mechanism built into the platform for it.
The Two Wine Packages the Installer Asks For
Partway through, the installation stops and asks to install additional Wine packages. Two are named in the documentation: Mono and Gecko. MetaQuotes states they are required for the platform to operate and instructs the user to agree.
The prompt is easy to decline. It arrives during an install that has been silent until then, it names two components with no obvious connection to trading, and declining lets the installation finish. A platform that opens afterwards looks like a success, and the missing pieces surface later in the parts of the terminal that rely on them.
Mono and Gecko are the Wine implementations of two Windows components that Windows programs assume are present: a runtime for managed code, and a browser engine for anything the program renders as a web view. Neither is optional in the sense that matters here, because MetaQuotes has stated the platform needs them.
Agree to both when asked. If the platform is already installed and behaving strangely in exactly those areas, a reinstall is the point at which the prompt comes round again.
Where Linux Actually Keeps Your Platform Files
Wine gives each program it installs its own virtual drive with its own environment, so the platform is not placed anywhere a Linux package manager would put an application. MetaQuotes documents the default location as a folder in the home directory, beginning .mt5, containing a virtual C drive, with the platform under Program Files inside it.
The leading dot matters, because a hidden folder is invisible in a file manager until hidden files are switched on, and in a terminal until the listing is asked to show them. That single character is why the search that should find an installed platform returns nothing.
Everything the terminal writes lives under that drive rather than beside it: the logs, the charts saved as templates and profiles, and the compiled programs the platform runs. A backup that copies the visible parts of a home directory and stops at hidden folders will copy none of it, and a fresh install on the same machine will not find what the old one saved.
Checking Which Wine Version You Ended Up With
The script picks the Wine package, so the version you are running is a result rather than a choice, and it is worth knowing which one you got. The platform prints it in the log it writes at startup, on the line recording the environment it is running in. MetaQuotes points users to that line, and it is read the same way as anything else in the terminal log.
There is no published minimum for Linux to compare it against. The MetaQuotes Linux documentation names no version at all. It recommends keeping both Wine and the operating system on their newest releases, and gives the update commands for doing so, but it sets no floor.
One version number does appear in the MetaQuotes announcement of the macOS and Linux installers: 8.0.1, below which the recommendation is to remove the platform along with the Wine prefix it sits in and reinstall. That recommendation is written in the macOS part of the announcement.
It is the only Wine version figure MetaQuotes publishes anywhere. A specific minimum stated in a third-party install guide is therefore not coming from the Linux documentation, and there is no official Linux number to check it against.
What Breaks After a Distribution Upgrade
A distribution upgrade replaces system packages, and Wine is a system package. The Wine environment holding the platform is not: it sits in the home directory, so an upgrade moves the layer underneath it while leaving the platform and its files in place.
That is the state to check for rather than assume. Read the startup log after the first launch and see which Wine version the platform reports now. MetaQuotes recommends keeping both the operating system and Wine current, so a newer version is the expected outcome, not a problem in itself.
Who This Page Is Not For
Anyone whose Linux machine is a server rather than a desktop is solving a different problem, and so is anyone whose goal is to call the platform from Python rather than to open its windows. Both cases are about running the terminal headless, which this page does not cover.
Before you treat the installation as finished, work through these:
- Confirm the command was run from a terminal you did not open with sudo.
- Confirm both additional Wine packages were accepted when the installer asked, rather than dismissed.
- Restart the operating system, as the documentation instructs, before judging whether anything is wrong.
- Switch on hidden files and confirm the .mt5 folder exists in the home directory, with the platform inside its virtual C drive.
- Open the startup log and read the Wine version the platform reports, so a later upgrade can be compared against something.
Risk warning: this page is educational and describes how the MetaTrader 5 platform is installed and stored on a Linux system. It is not advice to trade any instrument, to adopt any method, or to open an account with any provider. Leveraged trading carries a high risk of loss. Installation scripts, supported distributions, Wine packages and file paths are set by the software vendor and change over time, so read the current documentation of the platform before installing.
