Skip to content

Instantly share code, notes, and snippets.

@alrik11es
alrik11es / manage-etc-hosts.sh
Last active April 27, 2021 12:29 — forked from stvvt/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
set -eu
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# PATH TO YOUR HOSTS FILE