
Related: The Mac Terminal Commands Cheat Sheet You'll find that the song will keep playing nevertheless. Select Terminate and the window will close. Once you close the window, you might get a warning that closing Terminal will terminate the afplay process. To do this, add & disown after the path to the audio file: afplay /Users/itechno8/Downloads/file.wav & disown You can also choose to close the Terminal window after starting a song this will keep the song playing in the background, but you need to change the command you use. Once a song starts, you can stop the afplay command by pressing Control + C. (To get the file path for any file, simply select the file in Finder and press Cmd + Option + C to copy it to your keyboard.) To play an audio file from inside Terminal, run the afplay command followed by the path of the audio file you want to play.įor example: afplay /Users/itechno8/Downloads/file.wav There are commands that you can use to not only play audio files directly from inside Terminal, but to convert audio files as well.įirst, launch the Terminal app on your Mac from Applications > Utilities or from Spotlight. If you frequently find yourself working inside Terminal and want to play an audio file, there's no need to leave the app. The Terminal app is the gateway for command-line access in macOS.
