How To Install Microsoft Mono In Ubuntu 18.04/18.10

MONO is an Open Source implementation tool of Microsoft for installing the .Net framework in Linux. This now becomes the leading choice for development Cross-platform applications. We can install Microsoft mono in Ubuntu 18. so

This allows developers to create cross-platform applications. let’s see, how to install mono on ubuntu. 

Install Microsoft .net Framework 4.7:

If you try to install manually .net framework in Ubuntu Linux, this will install but .net 2.2 version. In order to get .net 4.7, you need to download the .net framework setup from Microsoft official site and installed it with the help of Mono. so

You may Download Mono here so

Check Out: Install Microsoft .Net Framework 4.7 In Ubuntu

You may follow these links to Install MONO for different OS platforms. Let’s Begin On Ubuntu, run the below commands so

Step 1: GnuPG is a free and complete implementation software for Symantec PGP cryptographic software suite. 

sudo apt install gnupg ca-certificates

mono install ubuntu

Step 2: Run the below command.

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

microsoft mono install

Check Out: Delete Users In Ubuntu Linux

Step 3:  you can download the packages by using the below commands.

echo "deb stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt-get update

Step 4: Now you have to install some required packages. 

sudo apt install mono-devel

ubuntu install mono

After some time, It will install MONO on your Ubuntu machine. so

Check Out: Install Times Roman Font In Ubuntu

We can check the Mono Version using the below command.

mono -V

Verify the Installation using the below methods:

We’re going to verify the installation of mono on the Ubuntu machine using the small code.

Create a file with “helloworld.cs” and put the below code in this file. 

using System;

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

Once you have created a file, use the CSC compiler to build the program.

csc helloworld.cs

Check Out: How To Update Windows Driver Using These Methods

The above command will build an executable named “helloworld.exe” file and run the below command to execute.

mono helloworld.exe

The output will look like:


Hello to my world 

If you need to execute the program only by its name, you have to make it executable using the below command.

chmod +x helloworld.exe

Now run the command to see the output ./helloworld.exe

You’re done ubuntu 18 install mono

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment