https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial#install

.NET Tutorial - Hello World in 10 minutes

Not ready to install anything? Try our in-browser tutorial.


  1. Install the .NET SDK

    To start building .NET apps you just need to download and install the .NET SDK (Software Development Kit).

    Linux Distribution

                     
    RHEL
                     
    Ubuntu 18.04
                     
    Ubuntu 17.10
                     
    Ubuntu 16.04
                     
    Ubuntu 14.04
                     
    Debian 9
                     
    Debian 8
                     
    Fedora 28
                     
    Fedora 27
                     
    CentOS / Oracle
                     
    openSUSE
                     
    SLES
         

    Add the dotnet product feed

    Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.

    Open a command prompt and run the following commands:

    sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
    

    Install the .NET SDK

    Update the products available for installation, then install the .NET SDK.

    In your command prompt, run the following commands:

    sudo yum update
    sudo yum install dotnet-sdk-2.1
  2. Create your app

    Open a new command prompt and run the following commands:

    dotnet new console -o myApp
    cd myApp

    The dotnet command creates a new application of type console for you. The -o parameter creates a directory named myAppwhere your app is stored, and populates it with the required files. The cd myApp command puts you into the newly created app directory.

    The main file in the myApp folder is Program.cs. By default, it already contains the necessary code to write "Hello World!" to the Console.

    using System;
    
    namespace myApp
    {
    class Program
    {
    static void Main(string[] args)
    {
    Console.WriteLine("Hello World!");
    }
    }
    }
  3. Run your app

    In your command prompt, run the following command:

    dotnet run

    Congratulations, you've built and run your first .NET app!

  4. Get an editor

    Visual Studio Code is a free, cross-platform code editor with support for .NET.

    Download Visual Studio Code

    For full language support including smart code completion and debugging, get the C# extension for Visual Studio Code.

    Download the C# Extension

  5. Keep learning

    Now that you've got the basics, you can keep learning with the .NET Quick Starts. In the first Quick Start you'll learn about collections.

    Quick start: Collections

 

<亲测>centos安装 .net core 2.1的更多相关文章

  1. <亲测>CentOS中yum安装ffmpeg

    CentOS中yum安装ffmpeg 1.升级系统 sudo yum install epel-release -y sudo yum update -y sudo shutdown -r now 2 ...

  2. <亲测>CentOS 7.3下Node.js 8.6安装配置(含NPM以及PM2)

    CentOS 7.3下Node.js 8.6安装配置 2017年09月30日 14:12:02 阅读数:2245更多 个人分类: Nodejs   版权声明:本文为博主原创文章,未经博主允许不得转载. ...

  3. Centos 安装.NET Core环境

    https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install 一.概述 本篇讨论如何把项目发布到Linux环境,主要包括 ...

  4. <亲测>CentOS7yum安装PHP7.2

    如果之前已经安装我们先卸载一下 yum -y remove php* 由于linux的yum源不存在php7.x,所以我们要更改yum源 rpm -Uvh https://dl.fedoraproje ...

  5. <亲测>CentOS7 安装mysql8.0(YUM方式)

    CentOS7 安装mysql(YUM方式)   1.下载mysql源安装包 shell> wget http://dev.mysql.com/get/mysql80-community-rel ...

  6. CentOS安装.NET CORE

    Add the dotnet product feed sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo ...

  7. 快速搭建CentOS+ASP.NET Core环境支持WebSocket

    环境:CentOS 7.x,.net core 2 以下.net core 2安装操作为官方方法.如果你使用Docker,那么更简单了,只需要docker pull microsoft/dotnet就 ...

  8. [转帖]CentOS 7安装并启动Google浏览器(★firecat亲测有效★)

    CentOS 7安装并启动Google浏览器(★firecat亲测有效★) https://blog.csdn.net/libaineu2004/article/details/82821405 自己 ...

  9. centos安装服务参考博客,亲测可用

    centos 安装nginx参考 日志log报错 nginx -c /etc/nginx/nginx.conf https://blog.csdn.net/weixin_41004350/articl ...

随机推荐

  1. 【转载】 详解BN(Batch Normalization)算法

    原文地址: http://blog.csdn.net/hjimce/article/details/50866313 作者:hjimce ------------------------------- ...

  2. 【转载】 从ACM会议看中国大陆计算机科学与国外的差距

    ps:   这是一篇06年的文章,与今日的国内计算机行业学术圈环境简直是天翻地覆,很不错的history,值得mark下,今日的cs学术发展十号是坏不发表意见,但是history是值得对比,借鉴,思考 ...

  3. shell常用函数封装-main.sh

    #!/bin/bash #sunlight sp monitor system #created on 2018/01/07#by chao.dong#used by sp servers consi ...

  4. [LeetCode&Python] Problem 171. Excel Sheet Column Number

    Given a column title as appear in an Excel sheet, return its corresponding column number. For exampl ...

  5. 牛客HJ浇花。

    我也不知道这是什么类型的题,算是简单模拟吧.但是有个方法很赞. 开两个数组,一个模拟花,一个记录不同浇花次数花的数量: 要找浇水的次数,那么记每次浇水的开头和结尾就行了,a—b;那么f[a]++;f[ ...

  6. HTML+CSS之background

    第一个专题--background属性 今天写一下background属性,具体如下: 1.background-color:默认值:transparent,这是我们在做网页时,经常使用的属性,较为简 ...

  7. RESTful规范(二)

    七 解析器 解析器的作用: -用来解析前台传过来的数据编码方式 urlencoded:form表单:name=lqz&age= formdata :上传文件:--dadfgdgag-- jso ...

  8. CentOS7源码安装qbittorrent最新版本

    CentOS的软件 yum 里 yum search qbittorrent yum info qbittorrent 找到的是3.37版本 官网最新的是4.12版本.但需要源码安装: 官网下载最新版 ...

  9. shell command

    查看网卡流量报告  sar  -n  DEV  kill pid  ps  -ef  |grep xxx  |grep -v grep  |awk '{print $2}'   |xargs   ki ...

  10. C++中的ravalue学习笔记

    一.学习笔记 1. A a = 42; 会先以42为参数构造一个A类对象,然后调用拷贝构造函数来构造a,目前编译器优化掉了拷贝构造函数的调用,测试拷贝构造函数是没有被调用的,但是其权限不能为priva ...