Get eggs
The most convenient solution to get a minimal exculsive CLI installation of Arch/Debian/Devuan or Ubuntu is to use get-eggs.
What you need to do is basically install a minimal i Linux version using netistall in the case of Debian or Devuan, server edition in the case of Ubuntu and archiso in the case of Arch Linux.
Instructions can be found in the blog article get-eggs