How to Install Mono on Ubuntu 24.04

Install Mono on Ubuntu 24.04

Mono is a cross-platform open-source .NET framework. It is designed to develop and manage software written in c# language. It allows programmers to develop software for all operating systems. It was first released on June 30, 2004, by Ximian, and is now owned by Microsoft. Mono framework is based on ECMA standards for c# and Common Language Runtime.

This tutorial will provide the complete details to install Mono on Ubuntu 24.04

How to Install Mono on Ubuntu 24.04

Mono does not exist in the official repositories of Ubuntu. However, it can be installed manually by importing its dependencies into the system. Follow the instructions provided below to install Mono on Ubuntu.

Step 1: Some package’s installation depends on other packages called dependencies. Similarly, to install Mono on Ubuntu, we need to install some dependencies by executing the below command:

sudo apt install apt-transport-https dirmngr


Step 2: After that, we need to communicate with the server securely, that we need to import the repository keys by executing the below command:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF


Step 3: Now, add the Mono repository to the list of Ubuntu repositories by executing the below command:

echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list


Step 4: Once the Mono repository is added to the system, update the system packages so it gets available for usage by executing the below command:

sudo apt update


Step 5: Once the preliminary steps are completed, then, you can install Mono on Ubuntu by running the given command:

sudo apt install mono-complete -y


If you are a developer then you can install Mono’s developer version by executing the below command:

sudo apt install monodevelop -y

Step 6: Once installed, you can verify its installation by running the given command:

mono --version

Conclusion

To install Mono on Ubuntu 24.04, first, install some necessary dependencies by executing this sudo apt install apt-transport-https dirmngr command. Then, import MonoDevelop repository keys by running this command sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF. Then, add mono repository to the Ubuntu system by executing this command echo “deb https://download.mono-project.com/repo/ubuntu vs-bionic main” | sudo tee /etc/apt/sources.list.d/mono-official-vs.list. After that update system repositories by executing this command sudo apt update. Lastly, execute this command to install Mono on Ubuntu.

For more how-tos and tutorials, keep visiting Linux World.