DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How to Create Your First .NET Program on Red Hat Enterprise Linux

How to Create Your First .NET Program on Red Hat Enterprise Linux

Learn how to use Vagrant to develop for .NET core on Red Hat Linux and create your first .NET program on RHEL in just 6 steps.

Don Schenck user avatar by
Don Schenck
·
Apr. 12, 17 · Tutorial
Like (1)
Save
Tweet
Share
4.41K Views

Join the DZone community and get the full member experience.

Join For Free

Sometimes, things are really easy. This is one of those cases. There are only six steps to creating and running your first .NET program on Red Hat Enterprise Linux (RHEL).

Install dotnet

What’s that? You don’t have RHEL installed on your Windows PC in a Virtual Machine (VM)? That’s okay… I’ll wait while you install it. Just follow this video to download and install the Red Hat Development Suite.

OK, now that you have a VM, open PowerShell and run vagrant up to start the VM. When that’s all finished (it'll just take a few minutes), run vagrant ssh to SSH into the VM.

Now that you’re at the RHEL command line, simply following the six steps in this video to install .NET Core on your VM.

Create a Directory

  • VM up and running: Check.

  • SSH’d into your VM: Check.

  • .NET Core installed: Check.

Create a directory for your Hello World! program using the command mkdir hw.

Move Into Directory

Use the command cd hw.

dotnet new

Use the command dotnet new.

(If that doesn’t work, it’s probably because you have a newer version of .NET Core. In that case, try dotnet new con.)

dotnet restore

Use the command dotnet restore. This pulls the required dependencies from NuGet.org.

dotnet run

Finally, run the program using dotnet run.

Finished!

Congratulations! You created your first .NET Core program on Linux. If you want to do more, start experimenting with the command  dotnet –help.

.NET Virtual Machine Linux (operating system)

Published at DZone with permission of Don Schenck, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Cloud Performance Engineering
  • What Is API-First?
  • Fargate vs. Lambda: The Battle of the Future
  • Container Security: Don't Let Your Guard Down

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: