Are you interested in creating cool applications using C# and databases? You might think you need a Windows computer, but guess what? You can do it on Ubuntu too! Let's explore how to get started.
Ubuntu is a Linux distribution based on Debian. It is officially released in three editions: Desktop, Server, and Core for Internet of things devices and robot.
Remember, while I've used the term "Ubuntu" https://ubuntu.com/desktop in my original statement, you can apply this concept to some Linux distribution or operating system you prefer. The key is that you have options ranging from the default version to official alternatives and community-made variants.
Official Ubuntu distributions: Kubuntu Lubuntu Ubuntu Budgie Ubuntu Kylin Ubuntu MATE Ubuntu Studio Xubuntu
Third-party Ubuntu distributions: Bodhi Linux elementary OS Linux Mint Peppermint OS Pop!_OS Zorin OS Linux Lite and more...
The .NET SDK allows you to develop apps with .NET.
With .NET Core 1.0, which was released on June 27, 2016, Microsoft official supported for .NET on Ubuntu (>= 14.04 LTS).
Given the extended support timeline as indicated on https://endoflife.date/dotnet, this guide will utilize .NET 8. This version has been chosen due to its long-term support, which is scheduled to continue for approximately 2 years and 4 months from now, concluding on November 10, 2026.
If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:
$ sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0
Visual Studio Code (VS Code) is a free, open-source code editor developed by Microsoft. It offers a range of features including syntax highlighting, debugging, intelligent code completion, snippets, and Git integration. VS Code supports extensions for various programming languages and frameworks, making it highly customizable and suitable for a wide range of development tasks. It is available on multiple platforms, including Windows, macOS, and Linux.
For Debian/Ubuntu-based systems, the most straightforward installation method for Visual Studio Code is to obtain and install the 64-bit .deb package https://code.visualstudio.com/docs/setup/linux. If your system has a graphical software center available, you can use that for the installation process.
SQL Server used to be Windows-only, but now it works on Ubuntu too! Here's how to install it:
Download the public key
$ curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
Manually download and register the SQL Server Ubuntu repository:
$ curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | sudo tee /etc/apt/sources.list.d/mssql-server-2022.list
Run the following commands to install SQL Server
$ sudo apt-get update && sudo apt-get install -y mssql-server
Once the package installation is complete, execute $ sudo /opt/mssql/bin/mssql-conf setup
and follow the prompts to set the SA password and select your SQL Server edition. Remember, the following editions are available under a free license: Evaluation, Developer, and Express.
After completing the configuration, check to ensure the service is running:
$ systemctl status mssql-server --no-pager