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. Redis持久化--RDB+AOF(转)

    1.Redis两种持久化方式 RDB 执行机制:快照,直接将databases中的key-value的二进制形式存储在了rdb文件中 优点:性能较高(因为是快照,且执行频率比aof低,而且rdb文件中 ...

  2. php操作mysql几个常用操作

    1.链接数据库 mysql_connet('数据库地址','数据库账号','数据库密码'); 2.选择数据库 mysql_select_db("数据库名"); 3.设置编码 mys ...

  3. 【leetcode】21-MergeTwoSortedLists

    problem MergeTwoSortedLists 一种方法是迭代,一种方法是递归: code /** * Definition for singly-linked list. * struct ...

  4. 利用sql语句进行增删改查

    1.查询 函数:raw(sql语句) 语法:Entry.objects.raw(sql) 返回:QuerySet 2.增删改 from django.db import connection def ...

  5. kmp--看毛片算法

    string str; int next[N];// 核♥: next[k] 字符串前(k-1)个元素有next[k]个相等前后缀 // 初始化 next[0]=-1; next[1]=0; void ...

  6. C语言--第三周作业评分和总结(5班)

    作业链接:https://edu.cnblogs.com/campus/hljkj/CS2017-5/homework/1073 一.评分要求 要求1 完成PTA第三周所有题(20分). 要求2 4道 ...

  7. MySQL主从、环境搭建、主从配制

    1. MySQL主从介绍    2.环境搭建   2.主从配制:修改主配制文件:vim /etc/my.cnf添加: server_id = ###log_bin = diy_name然后保存重启:/ ...

  8. PTA——最大公约数和最小公倍数

    PTA 7-26 最大公约数和最小公倍数 #include<stdio.h> int main(){ int num1,num2,temp1,temp2,r; scanf("%d ...

  9. 2017.5.10 MapReduce内部逻辑

    MapReduce内部逻辑 Split:HDFS 中的数据以 Split 方式作为 MapReduce 的输入 Block 是 HDFS 术语,Split 是 MapReduce 术语 通常1个 Sp ...

  10. python------模块定义、导入、优化 ------->random模块

    2.random模块 #随机浮点数 random.random()   #生成0到1之间的随机浮点数,不能自己指定 random.uniform(1,10)   #可以指定 #随机整数 random. ...