用 aplay 列出声卡并测试声音
排查'没声音'第一步:先确认 ALSA 硬件层正常,再怀疑 PulseAudio/PipeWire。
运行 aplay -l 列出所有声卡和播放设备,再运行 aplay /usr/share/sounds/alsa/Front_Center.wav,能听到'Front Center'说明硬件和驱动正常。
01命令
命令
$ aplay -l && aplay /usr/share/sounds/alsa/Front_Center.wav02作用说明
aplay 直接对接 ALSA,位于 PulseAudio 和 PipeWire 之下,所以测试文件能出声就说明硬件和内核驱动没问题,问题出在上层声音服务。列表中的 card/device 编号可以用 -D plughw:CARD=1,DEV=0 精确指定输出设备,排查 HDMI 和模拟输出双声卡时特别有用。播放时加 -vv 还能看到音量电平进度条。
03风险
!注意: 直接用 hw: 设备播放采样率不匹配的文件只会输出噪声,一般用 plughw: 或默认设备;没声音时先检查 alsamixer 里有没有被静音的通道。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- aplay(1) — command-line sound recorder and player for ALSA依据: Man page documents -l ('List all soundcards and digital audio devices') and -D device selection; confirms 'aplay', '-l' and list-devices text.
- aplay(1) — Debian man page (alsa-utils)依据: Man page header states 'aplay — command-line sound recorder and player for ALSA' and lists the -l list-devices option.
最后验证: 2026-09-19 · 分类: 媒体