I know C# and I like to switch between systems and use Linux. Can I use C# to build applications that will natively work on Linux? What should I do to make use of my knowledge of C# in a Linux system?
Note that I'm specialized in Unity3D, but I still want to create Linux applications using C#.
Yes, you can develop software on Ubuntu, that itself will run on Ubuntu, in C#. Both Mono and .NET Core support GNU/Linux systems like Ubuntu. (You can use them on other distros, too, like Debian, Raspbian, Fedora, CentOS, Arch, Gentoo, and so forth.) The Unity3D game engine also supports Ubuntu, as you probably know. Unity3D embeds Mono.
A number of packages for Ubuntu, installable with Ubuntu's package manager from officially community-supported software sources, are written in C# and use Mono. This includes the music player Banshee, the notetaking app Tomboy, the raster graphics editor Pinta, and the password manager KeePass (since version 2).
Most text editors, such as Gedit, Vim, and Emacs, have syntax highlighting for C#. MonoDevelop and Visual Studio Code are two popular integrated development environments that run on Ubuntu and support C# development.
Most likely you will stumble upon http://www.mono-project.com/
As the About Mono page says:
The supported platforms include Linux.
So, yes. Knowledge on C# can be very useful on Linux systems today.
You can now even do XAML based front end cross platform (Linux, Mac, Windows, Android, iOS, UWP) apps using .Net Core and a new project called Avalonia. Avalonia is in Beta, but works pretty well now. It is similar to WPF, but with some CSS like enhancements to styling.
I believe on Linux Avalonia targets Gtk currently, but they're wanting to move to something else. IT's mentioned in this video, but I personally couldn't understand what he said: https://www.youtube.com/watch?v=WESJUJWBLJ0
Linux provides its native APIs in the C programming language. A native Linux program uses these APIs to access files, I/O devices, sockets (networking), inter-process communications, threading, etc. To create a native Linux app you would write your app in C and then compile it with (most likely) GCC to end up with an executable. You can even go further and use GUI libraries in your program to add GUI (GTK and Qt are two popular ones) or use a packaging system to package your app (like .deb and .rpm files).
C#, F# and VB bring their own compiler (which normally produces IL code instead of machine code) and instead of directly using the Windows or Linux native APIs (both in C), they have their own wrappers around them. This means that there needs to be another extra layer between the compiled code and the OS. This extra layer has to read the IL code and translate that to the native Windows or Linux or macOS APIs. This extra layer can be .NET Framework, Mono or .NET Core (currently just .NET).
Now to answer the question "Is C# usable for Linux system programming?", in most cases yes.
The .NET has libraries for file handling, networking, threading and some I/O devices. Now for example, say you need to access Bluetooth in you app. .NET does not have any APIs for Bluetooth, so in such cases you have two options:
Other examples would be WiFi Direct, Gamepad, CPU temperature, Battery Info, Camera, GPS, Laptop Sensors, etc. So for low-level apps you're on your own (this is the case even on Windows unless you go with UWP). For such apps on Linux, C or Python would be a way better choice.
If you want to add GUI to your app, .NET has GUI libraries but only for Windows. Mono on the other hand has bindings for GTK called GTK# but naturally GTK# would always be behind the GTK development (which is not a problem unless you want the latest features).
.NET 6 has another solution for cross-platform GUI. In .NET 6 you can create a Blazor app with C#, HTML and CSS and use Electron to create a desktop app from it (as of writing this, it's not ready yet).
To sum up:
Pros of C# on Linux
Cons of C# on Linux