Is there a way to play music from iTunes with a Terminal command? I've tried to do this with the afplay command, but the music won't play because of a locked mp4 music file.


You can use AppleScript to play Music via iTunes.

osascript -e 'tell application "iTunes" to play playlist "My Favorites"'
| improve this answer | |

Well, in the NeXTSTEP spirit-

open /path/to/file.m4p

which will open file.m4p in iTunes.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .