How old do you have to be to get a CDL?
You can apply for a commercial learner's permit at 18 in every state, because the federal minimum for a CLP is 18. With a CLP or CDL at 18, 19 or 20, you may drive a commercial vehicle only inside your own state.
Crossing state lines with a commercial vehicle, or hauling for an interstate trip, takes a driver who is at least 21.
Sources: 49 CFR 383.71, Driver application and certification procedures (eCFR) · Why are 18 to 20-year-olds not allowed to operate a CMV across State lines now?