This question already has an answer here:
Recently I started leveling up in Ranger class, and I looked into the Beast master Ranger archetype and something bothered me. If a character decides to have a Pony as a Companion, would commanding him to Dash (Dodge or Disengage) take an action.
At 3rd level, you gain a beast companion that accompanies you on your adventures and is trained to fight alongside you.
Choose a beast that is no larger than Medium and that has a challenge rating of 1/4 or lower. Add your proficiency bonus to the beast’s AC, attack rolls, and damage rolls, as well as to any saving throws and skills it is proficient in.
The beast obeys your commands as best as it can. It takes its turn on your initiative, though it doesn't take an action unless you command it to. On your turn, you can verbally command the beast where to move (no action required by you).
Commanding it to move would not take an action but commanding something else would. And it can be a Ranger's companion since it is medium, has a 1/8 challenge and it can even be a mount since my character is a Halfling.