A solution would be to stop shipping macs with the terminal app\s. Computers are now used by a wide variety of people, some without technical knowledge, maybe a default switch on macOS that displays warnings on rather trivial attacks would help.
How is that a solution? These attacks would just tell you to install terminal if you don't already have it.
[dead]
Well it's becoming developer hostile enough already. Maybe drop python and all command line tools while they're at it.
Would do wonders for that mythical year of the linux desktop...