Linux is still in alpha testing on M1 Macs if you're thinking about installing it. MacOS is pretty controllable via the Terminal but it's not Linux. Having said that, one of my pals lives in Vi and he has a MBP.
Not so much intalling Linux, but using the machine like you would Linux.
Eg typing (sudo apt get update && apt get upgrade -y) in the Linux terminal would automatically update and install everything.