To prevent access to certain websites, I would like to edit the hosts file of the OS. What about the notation if I want to prevent calls to 123.abc, for example?
What would be used to work on it practically?
What should you never do in / with the file?
P.S.: There is a pi-hole running in my home network.
Then you need to decide if you want to direct these domains to 0.0.0.0 or 127.0.0.1. I read up on the difference long ago but forgot it now; anyhow I settled on 0.0.0.0 (this is configurable in hosts-block)
If you like a simple app that does all for you by just selecting sime lists, then go for (preferred )
Defender
This can also handle some cookie clean-up for you.
Or allow to add your own private block entries to hosts.editable
If you like similar way of adblocking via scrpting,
Then go for
Hosts-block
Or if you like to tinker on your own, just do so manually. Procedure is absolutely the same as on every network connected machine. Ohnonot already explained a bit above.
You may download (curl) adblocklists manually and add them to /etc/hosts…