There was malware for systems with 1/1000 the userbase of Linux. Even Amiga and Atari had plenty of it, macOS when it had 2% share, and others.