Forrest logo
back to the afplay tool

afplay:tldr:f19a6

afplay: Play a sound file (waits until playback ends).
$ afplay ${filename}
try on your machine

The command "afplay" is a macOS command-line utility used to play audio files.

In this particular command, "${filename}" represents a variable that should be replaced with the actual name of the audio file you want to play. For example, if you have an audio file called "song.mp3", you would replace "${filename}" with "song.mp3".

So, the complete command would look like: afplay song.mp3

When executed, the command will play the specified audio file using the default audio player on macOS.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the afplay tool