{"id":17223827,"url":"https://github.com/bartobri/hosts","last_synced_at":"2025-03-25T16:24:53.068Z","repository":{"id":82434661,"uuid":"130365808","full_name":"bartobri/hosts","owner":"bartobri","description":"Perl script to manage the local hosts file of a windows 10 machine","archived":false,"fork":false,"pushed_at":"2018-08-01T21:56:13.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T14:33:27.453Z","etag":null,"topics":["hosts","hostsfile","manage"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartobri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-20T13:27:35.000Z","updated_at":"2023-07-25T14:16:33.000Z","dependencies_parsed_at":"2023-06-15T16:30:14.593Z","dependency_job_id":null,"html_url":"https://github.com/bartobri/hosts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fhosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fhosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fhosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fhosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartobri","download_url":"https://codeload.github.com/bartobri/hosts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245497944,"owners_count":20625085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hosts","hostsfile","manage"],"created_at":"2024-10-15T04:09:21.150Z","updated_at":"2025-03-25T16:24:53.059Z","avatar_url":"https://github.com/bartobri.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"hosts\n======\n\nThis is a basic perl script to help manage entries in a local hosts file. It was\nbuilt for me to easily add, remove, comment, and uncomment entries in the hosts\nfile of my Windows 10 machine. Hoever, it is easily adaptable for unix/linux systems.\n\n#### Running on Windows 10\n\nBy default, it is set up to work on a Windows 10 platform from within the linux\nsubsystem. You will need to be comfortable installing and using the linux subsystem\nto use this script in its default state.\n\n#### Running on Unix/Linux\n\nTo run this on a unix/linux system, you will need to modify the $hosts_file and $newline\nvariables to match your system. Generally, these values would be \"/etc/hosts\" and \"\\n\"\nrespectively.\n\n#### Installing\n\nAssuming that Windows users are using the linux subsystem, the installation instructions\nare the same regardless of your platform.\n\n```\r\n$ git clone https://github.com/bartobri/hosts.git\r\n$ cd ./hosts\r\n$ sudo cp hosts /usr/local/bin/\r\n```\r\n\r\n#### Usage\r\n\r\nhosts needs to be run as root, so always use sudo.\r\n\r\nDump the hosts file:\r\n```\r\n$ sudo hosts show\r\n```\r\n\r\nAdd a new host entry\r\n```\r\n$ sudo hosts add newhost.com\r\n```\r\n\r\nRemove an existing host entry\r\n```\r\n$ sudo hosts rm newhost.com\r\n```\r\n\r\nComment an existing hosts entry\r\n```\r\n$ sudo hosts stop newhost.com\r\n```\r\n\r\nUncomment an existing hosts entry\r\n```\r\n$ sudo hosts start newhost.com\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartobri%2Fhosts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartobri%2Fhosts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartobri%2Fhosts/lists"}