wclear / hostsedit

Edit hosts file from the command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hostsedit

Edit the Window's hosts file from the command line.

To use

  1. Grab the code from this project.
  2. Build the solution using Visual Studio.
  3. Add the exe to PATH.
  4. In a command window with administrator privledges:
  5. Use 'hostsedit -a mywebsite.local' to add a line like '127.0.0.1 mywebsite.local' to the hosts file.
  6. Use 'hostsedit -a 127.0.0.1 mywebsite.local' to add a line like '127.0.0.1 mywebsite.local' to the hosts file.
  7. Use 'hostsedit -d mywebsite.local' to delete the line containing 'mywebsite.local'.
  8. Use 'hostsedit -s' to show the list of entries currently in the hosts file.

About

Edit hosts file from the command line.

License:MIT License


Languages

Language:C# 100.0%