In this article, it is the subject of running the files written in C# programming language on the Pardus operating system and performing the related installation steps.

What is C#?

C# is a powerful and flexible language that can be used on many different platforms. It can be used to develop applications that run on operating systems such as Windows, Mac, Linux and Android. It can also be used to develop web apps, mobile apps, games, desktop apps, and more.

Mono software, on the other hand, is a software that enables the C# programming language to run on Linux and other software. It is developed as open source and can be used in various projects.


First, open the terminal application to install the Mono software. Run the following commands in order. These operations will ensure the installation of the relevant packages, the installation of the package repositories and the updating of the package repositories.

sudo apt install dirmngr ca-certificates gnupg sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver. --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

Now we need to update our package repositories.

sudo apt update

Then run the relevant installation command.

sudo apt install mono-devel

After these steps, we have successfully installed the Mono software.

Running the First C# File

First, let's create a C# file. For this, run the following command with terminal application.

gedit test.cs

Then copy the codes below into your file.

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

After this process, close the text editing application. Then run the following command. This command enables the C# file to be compiled. It provides an executable file. First of all, you need to pay attention to the name of your file that will be created after compilation and the name of your file to be compiled.

csc /out:deeme123 test.cs

Then run the following command to run it with Mono. As mentioned above, test123 is our post-compile file and we will run it.

mono essay123