Daily Latest Tech Update

How to install and configure Mono on CentOS 8

  • Share
How to install and configure OpenCV on CentOS 8

Mono is a platform for cross-platform application development and operation based on ECMA / ISO standards. It is a free and open source application for the Microsoft .NET framework.

This tutorial explains how to install Mono on CentOS 8.


The instructions assume that you are signed in as a root or superuser sudo.

Install Mono on CentOS 8

The easiest and recommended way to install Mono on debian 10 is to install it directly from the Mono repository. This is a relatively straightforward process and will only take a few minutes.

  1. Import the GPG key from the repository with the following command:
    sudo rpm --import ''
  2. Add Mono repository to your system by running the command below:
    dnf config-manager --add-repo

    The output will look like this:

    Adding repo from:
  3. Once the repository is enabled, install Mono using:
    sudo dnf install mono-complete

    mono-complete Are all the metadata packages you need for mono development, mono-complete will install the Mono runtime, development tools and all mono libraries.

  4. Verify the installation by typing the following command that will print the Mono version:
    mono --version

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

    Mono JIT compiler version (tarball Tue Feb  4 19:28:42 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)

At this point, you have successfully installed Mono on CentOS 8, and you can start using it.

Getting started with Mono with Hello World

To verify that everything is set up correctly we will create a program that prints the classic “hello world” message.

Open a text editor nano And create a file called hello.cs with the following contents:

nano hello.cs
using System;

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

use csc To build the program:

csc hello.cs

The above command will create an executable file named hello.exe.

Run the executable file using the command below:

mono hello.exe

The output will look like this:

Hello, World

If you want to run the program by typing its name only, you must set a flag so that it can be executed with the chmod command:

chmod +x hello.exe

You can now play the file hello.exe By typing:



The latest Mono firmware packages are available for installation from the official Mono package repositories.


Source link

  • Share

Leave a Reply

Your email address will not be published. Required fields are marked *