How To Install dotnet-host on CentOS 8

dotnet-host is .NET command line launcher

Introduction

In this tutorial we learn how to install dotnet-host on CentOS 8.

What is dotnet-host

The .NET host is a command line program that runs a standalone .NET application or launches the SDK. .NET is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services.

We can use yum or dnf to install dotnet-host on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install dotnet-host.

Install dotnet-host on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install dotnet-host using dnf by running the following command:

sudo dnf -y install dotnet-host

Install dotnet-host on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install dotnet-host using yum by running the following command:

sudo yum -y install dotnet-host

How To Uninstall dotnet-host on CentOS 8

To uninstall only the dotnet-host package we can use the following command:

sudo dnf remove dotnet-host

dotnet-host Package Contents on CentOS 8

/etc/dotnet
/etc/dotnet/install_location
/etc/profile.d/dotnet.sh
/usr/bin/dotnet
/usr/lib/.build-id
/usr/lib/.build-id/02
/usr/lib/.build-id/02/1fe6d802f15b3c6419a9509464a60585b6cc25
/usr/lib64/dotnet
/usr/lib64/dotnet/LICENSE.txt
/usr/lib64/dotnet/ThirdPartyNotices.txt
/usr/lib64/dotnet/dotnet
/usr/lib64/dotnet/host
/usr/lib64/dotnet/host/fxr
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/dotnet
/usr/share/man/man1/dotnet-add-package.1.gz
/usr/share/man/man1/dotnet-add-reference.1.gz
/usr/share/man/man1/dotnet-build-server.1.gz
/usr/share/man/man1/dotnet-build.1.gz
/usr/share/man/man1/dotnet-clean.1.gz
/usr/share/man/man1/dotnet-help.1.gz
/usr/share/man/man1/dotnet-install-script.1.gz
/usr/share/man/man1/dotnet-list-package.1.gz
/usr/share/man/man1/dotnet-list-reference.1.gz
/usr/share/man/man1/dotnet-migrate.1.gz
/usr/share/man/man1/dotnet-msbuild.1.gz
/usr/share/man/man1/dotnet-new.1.gz
/usr/share/man/man1/dotnet-nuget-delete.1.gz
/usr/share/man/man1/dotnet-nuget-locals.1.gz
/usr/share/man/man1/dotnet-nuget-push.1.gz
/usr/share/man/man1/dotnet-pack.1.gz
/usr/share/man/man1/dotnet-publish.1.gz
/usr/share/man/man1/dotnet-remove-package.1.gz
/usr/share/man/man1/dotnet-remove-reference.1.gz
/usr/share/man/man1/dotnet-restore.1.gz
/usr/share/man/man1/dotnet-run.1.gz
/usr/share/man/man1/dotnet-sln.1.gz
/usr/share/man/man1/dotnet-store.1.gz
/usr/share/man/man1/dotnet-test.1.gz
/usr/share/man/man1/dotnet-tool-install.1.gz
/usr/share/man/man1/dotnet-tool-list.1.gz
/usr/share/man/man1/dotnet-tool-uninstall.1.gz
/usr/share/man/man1/dotnet-tool-update.1.gz
/usr/share/man/man1/dotnet-vstest.1.gz
/usr/share/man/man1/dotnet.1.gz
/etc/dotnet
/etc/dotnet/install_location
/etc/profile.d/dotnet.sh
/usr/bin/dotnet
/usr/lib/.build-id
/usr/lib/.build-id/8d
/usr/lib/.build-id/8d/1f35524979579aeb33934307773911b10b6078
/usr/lib64/dotnet
/usr/lib64/dotnet/LICENSE.txt
/usr/lib64/dotnet/ThirdPartyNotices.txt
/usr/lib64/dotnet/dotnet
/usr/lib64/dotnet/host
/usr/lib64/dotnet/host/fxr
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/dotnet
/usr/share/man/man1/dotnet-add-package.1.gz
/usr/share/man/man1/dotnet-add-reference.1.gz
/usr/share/man/man1/dotnet-build-server.1.gz
/usr/share/man/man1/dotnet-build.1.gz
/usr/share/man/man1/dotnet-clean.1.gz
/usr/share/man/man1/dotnet-help.1.gz
/usr/share/man/man1/dotnet-install-script.1.gz
/usr/share/man/man1/dotnet-list-package.1.gz
/usr/share/man/man1/dotnet-list-reference.1.gz
/usr/share/man/man1/dotnet-migrate.1.gz
/usr/share/man/man1/dotnet-msbuild.1.gz
/usr/share/man/man1/dotnet-new.1.gz
/usr/share/man/man1/dotnet-nuget-delete.1.gz
/usr/share/man/man1/dotnet-nuget-locals.1.gz
/usr/share/man/man1/dotnet-nuget-push.1.gz
/usr/share/man/man1/dotnet-pack.1.gz
/usr/share/man/man1/dotnet-publish.1.gz
/usr/share/man/man1/dotnet-remove-package.1.gz
/usr/share/man/man1/dotnet-remove-reference.1.gz
/usr/share/man/man1/dotnet-restore.1.gz
/usr/share/man/man1/dotnet-run.1.gz
/usr/share/man/man1/dotnet-sln.1.gz
/usr/share/man/man1/dotnet-store.1.gz
/usr/share/man/man1/dotnet-test.1.gz
/usr/share/man/man1/dotnet-tool-install.1.gz
/usr/share/man/man1/dotnet-tool-list.1.gz
/usr/share/man/man1/dotnet-tool-uninstall.1.gz
/usr/share/man/man1/dotnet-tool-update.1.gz
/usr/share/man/man1/dotnet-vstest.1.gz
/usr/share/man/man1/dotnet.1.gz
/etc/dotnet
/etc/dotnet/install_location
/etc/profile.d/dotnet.sh
/usr/bin/dotnet
/usr/lib/.build-id
/usr/lib/.build-id/ad
/usr/lib/.build-id/ad/1f7fbb0bb27242d1e5f97158a26ae547144128
/usr/lib64/dotnet
/usr/lib64/dotnet/LICENSE.txt
/usr/lib64/dotnet/ThirdPartyNotices.txt
/usr/lib64/dotnet/dotnet
/usr/lib64/dotnet/host
/usr/lib64/dotnet/host/fxr
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/dotnet
/usr/share/man/man1/dotnet-add-package.1.gz
/usr/share/man/man1/dotnet-add-reference.1.gz
/usr/share/man/man1/dotnet-build-server.1.gz
/usr/share/man/man1/dotnet-build.1.gz
/usr/share/man/man1/dotnet-clean.1.gz
/usr/share/man/man1/dotnet-help.1.gz
/usr/share/man/man1/dotnet-install-script.1.gz
/usr/share/man/man1/dotnet-list-package.1.gz
/usr/share/man/man1/dotnet-list-reference.1.gz
/usr/share/man/man1/dotnet-migrate.1.gz
/usr/share/man/man1/dotnet-msbuild.1.gz
/usr/share/man/man1/dotnet-new.1.gz
/usr/share/man/man1/dotnet-nuget-delete.1.gz
/usr/share/man/man1/dotnet-nuget-locals.1.gz
/usr/share/man/man1/dotnet-nuget-push.1.gz
/usr/share/man/man1/dotnet-pack.1.gz
/usr/share/man/man1/dotnet-publish.1.gz
/usr/share/man/man1/dotnet-remove-package.1.gz
/usr/share/man/man1/dotnet-remove-reference.1.gz
/usr/share/man/man1/dotnet-restore.1.gz
/usr/share/man/man1/dotnet-run.1.gz
/usr/share/man/man1/dotnet-sln.1.gz
/usr/share/man/man1/dotnet-store.1.gz
/usr/share/man/man1/dotnet-test.1.gz
/usr/share/man/man1/dotnet-tool-install.1.gz
/usr/share/man/man1/dotnet-tool-list.1.gz
/usr/share/man/man1/dotnet-tool-uninstall.1.gz
/usr/share/man/man1/dotnet-tool-update.1.gz
/usr/share/man/man1/dotnet-vstest.1.gz
/usr/share/man/man1/dotnet.1.gz
/etc/dotnet
/etc/dotnet/install_location
/etc/profile.d/dotnet.sh
/usr/bin/dotnet
/usr/lib/.build-id
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/966f2cb8f5bb06978a5395de59c8e35c85edc6
/usr/lib64/dotnet
/usr/lib64/dotnet/LICENSE.txt
/usr/lib64/dotnet/ThirdPartyNotices.txt
/usr/lib64/dotnet/dotnet
/usr/lib64/dotnet/host
/usr/lib64/dotnet/host/fxr
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/dotnet
/usr/share/man/man1/dotnet-add-package.1.gz
/usr/share/man/man1/dotnet-add-reference.1.gz
/usr/share/man/man1/dotnet-build-server.1.gz
/usr/share/man/man1/dotnet-build.1.gz
/usr/share/man/man1/dotnet-clean.1.gz
/usr/share/man/man1/dotnet-help.1.gz
/usr/share/man/man1/dotnet-install-script.1.gz
/usr/share/man/man1/dotnet-list-package.1.gz
/usr/share/man/man1/dotnet-list-reference.1.gz
/usr/share/man/man1/dotnet-migrate.1.gz
/usr/share/man/man1/dotnet-msbuild.1.gz
/usr/share/man/man1/dotnet-new.1.gz
/usr/share/man/man1/dotnet-nuget-delete.1.gz
/usr/share/man/man1/dotnet-nuget-locals.1.gz
/usr/share/man/man1/dotnet-nuget-push.1.gz
/usr/share/man/man1/dotnet-pack.1.gz
/usr/share/man/man1/dotnet-publish.1.gz
/usr/share/man/man1/dotnet-remove-package.1.gz
/usr/share/man/man1/dotnet-remove-reference.1.gz
/usr/share/man/man1/dotnet-restore.1.gz
/usr/share/man/man1/dotnet-run.1.gz
/usr/share/man/man1/dotnet-sln.1.gz
/usr/share/man/man1/dotnet-store.1.gz
/usr/share/man/man1/dotnet-test.1.gz
/usr/share/man/man1/dotnet-tool-install.1.gz
/usr/share/man/man1/dotnet-tool-list.1.gz
/usr/share/man/man1/dotnet-tool-uninstall.1.gz
/usr/share/man/man1/dotnet-tool-update.1.gz
/usr/share/man/man1/dotnet-vstest.1.gz
/usr/share/man/man1/dotnet.1.gz

References

Summary

In this tutorial we learn how to install dotnet-host on CentOS 8 using yum and dnf.