You can edit the hosts file with any text editor. There are a variety available, but both Windows 10 and 11 come with Notepad ...
I have a strange thing with my hosts file in Mountain Lion. It seems like every time I reboot my machine the hosts file rolls back to a version I had when I first installed it. Am I missing something ...