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. make命令回显Makefile执行脚本命令

    /********************************************************************** * make命令回显Makefile执行脚本命令 * 说 ...

  2. HPU1460: 杨八方的表面兄弟

    题目描述 如果你之前关注过HPUOJ的话,那么你一定听说过杨八方的名字.在去年,很多同学共同见证了杨八方同学的填报志愿.来到学校.军训--或许你曾陪同杨八方一起思考过许多问题,又或者你是刚听说这个名字 ...

  3. Python简单介绍

    一.变量名命名规则 1).变量名要由字母数字下划线组成 2)变量名禁止以数字开头 3)变量名禁止使用Python自带关键字 4)变量名不要用中文和拼音 5)变量名大小写敏感 6)变量名推荐写法:下划线 ...

  4. spring IOC简单分析

    Spring IOC 体系结构 BeanFactory(BeanFactory 里只对 IOC 容器的基本行为作了定义,根本不关心你的 bean 是如何定义怎样加载的.正如我们只关心工厂里得到什么的产 ...

  5. linux----磁盘介绍

    1.磁盘简图: 2.常见分区 mbr:主引导区,共512byte 扩展分区 逻辑分区

  6. Chrome (开发者工具)快捷键

    https://9iphp.com/web/javascript/chrome-devtools-shortcuts.html https://www.cnblogs.com/davidwang456 ...

  7. Python知识点整理,基础5 - 文件操作

  8. CH4901 关押罪犯

    题意 4901 关押罪犯 0x49「数据结构进阶」练习 描述 S 城现有两座监狱,一共关押着N 名罪犯,编号分别为1~N.他们之间的关系自然也极不和谐.很多罪犯之间甚至积怨已久,如果客观条件具备则随时 ...

  9. MySQL数据库的学习

    ------------------------------------- 管理数据库PS: Mysql的管理 主要是包括 用户的管理. show........各种的信息   SHOW COLUMN ...

  10. 使用VUE搭建tab标签组件

    Vue2.0 多 Tab切换组件简单封装,满足自己简单的功能,可以直接拿去使用! 首先上效果图: 功能简单介绍: 1.支持tab切换 2.支持tab定位 3.支持tab自动化 仿React多Tab实现 ...