Want to program in .Net on Linux and still do not know where to start? Then see how to install Mono on Ubuntu, Debian and derivatives, and start producing.
While being boosted as a software platform designed to allow developers to easily create cross-platform applications, Microsoft’s .Net Framework officially supports only the Windows operating system.
Unfortunately, in order for us to port applications written in .Net Framework to platforms other than Windows, such as Linux, Mac OS X, iPhone OS, Oracle Solaris, FreeBSD, and others, we need to use the platform named Mono that is sponsored by Xamarin.
In summary, Mono is an open source implementation of Microsoft .NET Framework based on ECMA standards for C # and Common Language Runtime. Here’s how to install this technology on Ubuntu, Debian and derivatives of these.
Get to know Mono better
To learn more about this technology, click on this link .
How to install Mono on Ubuntu, Debian and derivatives
Mono is available in the official repositories of Ubuntu, Debian and derivatives, and can be installed using the Program Center or by using the command
sudo apt-get install mono-devel. However, in older versions, to install Mono on Ubuntu and be able to automatically receive future upgrades from it, you must do the following:
Step 1. Open a terminal (on Unity use the CTRL + ALT + T keys);
Step 2. If you do not already have it, add the program repository with this command or use this tutorial ;
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
Step 3. Download and install the repository key with this command;
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
Step 4. Update the package manager with the command:
sudo apt-get update
Step 5. To install only what is necessary to compile the code, use the command below;
sudo apt-get install mono-devel
Step 6. To install everything from Mono, use the command below;
sudo apt-get install mono-complete
Step 7. To install the PCL build support, use the command below;
sudo apt-get install eferenceassemblies-pcl
Step 8. To obtain SSL certificates for HTTPS connections in Mono, use the command below;
sudo apt-get install ca-certificates-mono
How to install Mono manually or in other distros
For those who could not install with the above procedure, do not want to add the repository or want to try to install in another Debian-based distribution, you can get the DEB file of the program on that link and install it manually (double-clicking on it).
But remember! By choosing this type of installation, you will not receive any updates to the program.
Ready! Now, when you want to start the program, type
monoin the terminal and see the command options.
On another occasion, I’ll show you how to install the MonoDevelop IDE. Keep an eye!
Uninstalling Mono on Ubuntu and derivatives
To uninstall Mono in Ubuntu and derivatives, do the following:
Step 1. Open a terminal;
Step 2. Uninstall the program, using the commands below;
sudo apt-get remove mono-*
sudo apt-get autoremove