Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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"'
Well, in the NeXTSTEP spirit-
which will open file.m4p in iTunes.