ppech.dotnet.hostsctl
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global ppech.dotnet.hostsctl --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local ppech.dotnet.hostsctl --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ppech.dotnet.hostsctl&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package ppech.dotnet.hostsctl --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
hostsctl
hostsctl
is a command-line tool for managing your system's hosts file. It provides commands for:
- list entries
- exists of entry
- add, remove, enable, and disable entries
- backup and restore hosts file
With options you can specify:
- specify a custom input/output file
- use JSON output format
Table of Contents
Commands
list
list the entries in the hosts filebackup
backups the hosts filerestore
restores the hosts file from a backupadd <hostname>
adds entry to the hosts fileremove <hostname>
removes entry from hosts fileenable <hostname>
enables entry in hosts filedisable <hostname>
disables entry in hosts fileexists <hostname>
checks if entry exists in hosts fileopen
opens hosts file (using shell execute)
Options
-i|--input <file>
: path of input file, default value depends on operating system-o|--output <file>
: path of output file, default value is same as input file-j|--json
: output as JSON<hostname>
: host name, ex. app.mydomain.local[ip]
: ip address, default is 127.0.0.1
Installation
You can install it using the dotnet tool install ppech.dotnet.hostsctl --global
command.
To update dotnet.hostsctl
to the latest version, use the dotnet tool update
command.
Build with
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.