ppech.dotnet.hostsctl 1.0.0

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
nuke :add-package ppech.dotnet.hostsctl --version 1.0.0

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 file
  • backup backups the hosts file
  • restore restores the hosts file from a backup
  • add <hostname> adds entry to the hosts file
  • remove <hostname> removes entry from hosts file
  • enable <hostname> enables entry in hosts file
  • disable <hostname> disables entry in hosts file
  • exists <hostname> checks if entry exists in hosts file
  • open 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 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.

Version Downloads Last updated
1.0.0 88 5/30/2024