I set up a little ubuntu box for my son for remote learning and I would like him to only access certain domains in the browser. I was thinking of doing a blanket
etc/hosts but I would need to add exceptions for his school websites. Is that possible?
In theory, yes. But my kids also need access to various Google and Microsoft sites, and then there are all kinds of random sites the teachers seem to have them visit for slides, etc. I think it's likely something you'll never be able to keep up with.
Instead, I would recommend setting your DNS to something like 220.127.116.11 for Families to try to blacklist some less-than-acceptable sites.