The most reliable way to get MIB commander is shooting down MIB ships, and tthus triggering MIB retaliation against your bases. The final phase spawns a very large Strike Ship which includes the commander. You might want to shoot it down if it seems like it might target a base that could not deal with it. The other alternative is the MIB Outpost mission, but the chance of it spawning is only 3 % once you have completed its requirements.
You'll need special tactics to maximise the chance to get ethereal commander as well. The best bet is after you've obtained MIB commander, because researching it triggers ethereal retaliation missions, where some ships have the commander. Look at the previous link to see how to best get one.
The last parts of the game can be extremely RNG-grindy and to preserve your sanity you may need to skip a lot of useless missions. Usually I've just gotten bored and stopped playing the campaign, and after some time started a new one.