Add Power Chime to Mac Terminal: 3 Ways
To add a power chime to your Mac using Terminal, you can use a simple command to play a sound when your Mac starts up or wakes from sleep. The easiest method is to use the afplay command with a system sound file, or create a launch agent that runs the command automatically. This article explains the three most reliable ways to set this up, from a quick manual test to a permanent solution.
Why Add a Power Chime to Your Mac?
The power chime is the sound a Mac makes when it is turned on or wakes from sleep. On older Macs, this sound was built into the startup process. On newer models, especially those with Apple Silicon (M1, M2, M3, etc.), the chime is often disabled by default or only plays when the Mac is connected to power. Many users miss the audible feedback because it confirms the Mac is booting or waking up, which is especially useful when the screen is off or the Mac is in a different room. Adding a chime via Terminal gives you control over when and how the sound plays, and you can choose any sound file on your system.
Prerequisites: What You Need
Before you start, make sure you have:
- A Mac running macOS (any recent version, including Ventura, Sonoma, or Sequoia).
- Terminal app, located in /Applications/Utilities/Terminal.app.
- A sound file in a format macOS can play (AIFF, WAV, MP3, or CAF). The classic startup chime is a file called
startup.aifforPowerOn.wav. - Administrator privileges if you plan to create a launch agent that runs at login (though most methods do not require admin).
You can test the chime with any sound file, but using the original startup sound gives the most authentic experience. On many Macs, the original chime is located at /System/Library/Sounds/ or inside the CoreServices folder. If you cannot find it, you can download a copy from a trusted source or use any other sound file.
Method 1: Manual Playback with afplay
The simplest way to play a chime is to use the afplay command, which plays audio files from the command line. Open Terminal and type:
afplay /System/Library/Sounds/Glass.aiff
This plays the “Glass� sound. To use the actual startup chime, you need to locate the file. On many Intel Macs, the file is at /System/Library/CoreServices/StartupSound.aiff or /System/Library/Sounds/startup.aiff. On Apple Silicon Macs, the chime is embedded in the firmware and not easily accessible as a file. If you cannot find it, you can use any sound file you like. For example, to play a custom sound, use:
afplay /path/to/your/sound.mp3
This method is manual—you must run the command each time you want the chime. It is useful for testing, but not for automatic playback.
Method 2: Automatic Chime at Login with a Launch Agent
To make the chime play automatically every time you log in, you can create a launch agent. A launch agent is a plist file that tells macOS to run a command at login. Here are the steps:
- Open Terminal and create a folder for your custom launch agents if it does not exist:
mkdir -p ~/Library/LaunchAgents - Create a plist file using a text editor. For example, use
nano:nano ~/Library/LaunchAgents/com.user.powerchime.plist - Paste the following XML content (replace the path to your sound file):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.user.powerchime</string> <key>ProgramArguments</key> <array> <string>/usr/bin/afplay</string> <string>/System/Library/Sounds/Glass.aiff</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> - Save the file (in nano, press Ctrl+O, then Enter, then Ctrl+X).
- Load the launch agent with:
launchctl load ~/Library/LaunchAgents/com.user.powerchime.plist
Now the chime will play every time you log in. To remove it, run launchctl unload and delete the plist file.
Method 3: Using a Login Item or AppleScript
Another approach is to use a login item with an AppleScript that plays a sound. This is more flexible if you want to control the volume or play a specific sound only when waking from sleep. Here is a simple AppleScript:
do shell script "afplay /System/Library/Sounds/Ping.aiff"
Save this as an application (in Script Editor, File > Export, choose Application). Then add that application to your login items: System Settings > General > Login Items, and click the plus button to add the app. This method plays the sound at login, but not at wake from sleep. To play at wake, you would need a more complex setup using a persistent process that listens for sleep/wake notifications, which is beyond the scope of this article.
Common Problems and Troubleshooting
If the chime does not play, check the following:
- Sound file path is incorrect. Use the full path and verify the file exists with
ls -l /path/to/file. - Volume is muted or too low. Ensure your Mac’s volume is not muted and the sound output is set to your speakers.
- Launch agent not loaded. Check if the agent is loaded with
launchctl list | grep powerchime. If not, reload it. - File permissions. If the sound file is in a protected system folder, you may need to copy it to your home folder and use that path.
- Sleep vs. login. The launch agent method only works at login, not at wake from sleep. For wake, you need a different tool.
Frequently Asked Questions
Does the power chime work on Apple Silicon Macs?
Yes, but the original startup chime is not stored as a file on Apple Silicon Macs. You can use any other sound file, such as Glass or Ping, or download a copy of the classic chime from a trusted source. The afplay command works the same on both Intel and Apple Silicon.
Can I make the chime play only when waking from sleep?
Yes, but it requires a more advanced setup using a background process that monitors system sleep/wake notifications. A simple launch agent only runs at login. You can use an AppleScript with a stay-open application that listens for these notifications, but that is beyond the scope of this article.
Is there a way to play the chime without Terminal?
Yes, you can use the Finder to navigate to the sound file and double-click it, but that requires manual action. For automatic playback, you need a login item or launch agent, which are created via Terminal or System Settings.
Will adding a launch agent slow down my Mac?
No, the afplay command is very lightweight and runs once at login. It has no noticeable impact on performance.
How do I remove the power chime if I no longer want it?
To remove a launch agent, run launchctl unload ~/Library/LaunchAgents/com.user.powerchime.plist and delete the plist file. If you used a login item, remove it from System Settings > General > Login Items.
Alternatives and Extra Tips
If you want more control, you can use third-party apps that provide a GUI for setting startup sounds, but the Terminal methods above are free and built-in. You can also change the sound file by editing the plist or the AppleScript. To find the original startup chime file, search your system with find /System -name "*startup*" (you may need to use sudo). If you cannot find it, you can extract it from a macOS installer or download it from a reputable source. Always test the sound file with afplay first to ensure it plays correctly.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.