How to Install Mono on Debian 10

Published on

3 min read

Install Mono on Debian

Mono is a platform for developing and running cross-platform applications based on the ECMA/ISO Standards. It is a free and open-source implementation of Microsoft’s .NET framework.

This article provides information on how to install Mono on Debian 10.


The instructions assume that you are logged in as root or user with sudo privileges .

Installing Mono on Debian

Mono is not available in the standard Debian repositories. We’ll install the Mono packages from the official Mono’s repositories. It is a relatively straightforward process and will only take a few minutes.

  1. Start by installing the necessary packages:

    sudo apt updatesudo apt install dirmngr gnupg apt-transport-https ca-certificates
  2. Enter the following command to import the repository’s GPG key:

    sudo apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

    The output should look like below:

    gpg: key A6A19B38D3D831EF: public key "Xamarin Public Jenkins (auto-signing) <>" imported
    gpg: Total number processed: 1
    gpg:               imported: 1
  3. Add the Mono repository to your system sources’ list:

    sudo sh -c 'echo "deb stable-buster main" > /etc/apt/sources.list.d/mono-official-stable.list'
  4. Once the apt repository is enabled , update the packages list and install Mono:

    sudo apt updatesudo apt install mono-complete 

    mono-complete is a meta-package that installs everything you need for Mono development, including the runtime, development tools, and all libraries.

  5. Verify the installation printing the Mono version:

    mono --version

    At the time of writing this article, the latest stable version of Mono is 6.8.0 Stable (

    Mono JIT compiler version (tarball Tue Feb  4 21:20:43 UTC 2020)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          yes(610)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)

That’s it. You have successfully installed Mono on your Ubuntu, and you can start developing your application.

Getting Started with Mono

To verify that everything is set up correctly, we’ll build a Hello World program that will print the classic “hello world” message.

Open your text editor and create a file named hello.cs with the following content:

using System;

public class HelloWorld
    public static void Main(string[] args)
        Console.WriteLine ("Hello World!");

Use the csc compiler to build the program:

csc hello.cs

The command above will build an executable named hello.exe.

Run the executable using the command below:

mono hello.exe

The output should look something like this:

Hello, World

To be able to execute the program only by typing its name, you’ll need to make the file executable :

chmod +x hello.exe

You can now run the hello.exe file by typing:



The latest stable Mono release packages are available for installation from the official Mono repository.

If you hit a problem or have feedback, leave a comment below.