don't work using cmd
C:\Windows\System32\Drivers\etc\hosts' is not recognized as an internal or external command,
operable program or batch file.
it's work in computer folder, paste command into search box then select notepad to execute.
https://i.postimg.cc/gJJ7GWc2/bo.pngEdited in to the OP that people should check your reply rather than doing the method I posted, thanks!