How to run C code on Ubuntu

0 votes
How can I run C# code on Ubuntu? Can I install Visual Studio for Ubuntu? I have a Ubuntu machine and I want to work on C# applications. Please suggest.
Mar 1, 2019 in Others by Abha
• 28,140 points
6,404 views

1 answer to this question.

0 votes

Hey @Abha, you can create and run C# applications on Ubuntu. For that, you just have to install Visual Studio for Ubuntu. Please follow the mentioned steps one by one and you will be able to install it without any hassle:

1. Use the following command to install Microsoft key:

>>curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

 

>>sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

2. Then use next line of code to install the repository with following script:

>>sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

3. Now update the Package repository and install Visual Studio Code:

>>sudo apt-get update
>>sudo apt-get install code # or code-insiders

4. After successful installation of Visual Studio Code, open 'Visual Studio Code IDE' on your system and navigate to 'Extensions'. Now search for 'C# Extensions' and click 'Install' to install it:

5. Finally install .NET SDK using following command and you are good to go. You can now create and run your C# code in ubuntu:

>>sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

answered Mar 1, 2019 by Anvi
• 14,150 points

Related Questions In Others

0 votes
1 answer

How to run seed.rb file on Amazon ec2

To gain access to the Amazon instance, ...READ MORE

answered Mar 24, 2022 in Others by Edureka
• 13,690 points
642 views
0 votes
1 answer

How to expend the code to transfer data from one spreadsheet to another based on multiple criteria

 The progress bar is unnecessary. Option Explicit Sub VTest2() ...READ MORE

answered Jan 29, 2023 in Others by narikkadan
• 63,680 points
417 views
0 votes
1 answer

how to install Amazon AWS Command Line Interface tools on Bamboo build agent.

Hi@Abhishek, You need to set the following parameters ...READ MORE

answered Apr 6, 2020 in Others by MD
• 95,460 points
1,814 views
0 votes
0 answers

How to run commands within fabric pods through a batch script?

I am trying to write a batch ...READ MORE

May 30, 2020 in Others by anonymous
• 120 points
990 views
0 votes
1 answer
0 votes
1 answer

How to install C#

Hi @Akanksha, C# is a programming language ...READ MORE

answered Feb 28, 2019 in Others by Pratibha
• 3,690 points
1,063 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,221 views
0 votes
1 answer

How to do Installation of Ruby on Rails on Linux (Ubuntu)?

Hi Pratibha, installing ROR on ubuntu is ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
1,858 views
0 votes
1 answer

Golang on Linux... How to install it?

Hey @Abhi, if you want to install ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
936 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP