Related to this question and this question but with Pipewire not pulse audio (unless it is the same, but pacmd doesn't work):
How do you set the default output device (the radio button below) at the command line?
Related to this question and this question but with Pipewire not pulse audio (unless it is the same, but pacmd doesn't work):
How do you set the default output device (the radio button below) at the command line?
you have to use pactl.
pactl --help says:
...
pactl [options] set-default-(sink|source) NAME
...
and you can get the name examining the output of:
pactl list sinks
according to the arch-wiki it seems that, with the package pipewire-pulse, even though pulseaudio is not running or installed, the command pactl is usable.
I can confirm this works on one of my debian-based machines (specifically the Librem5 with mobian).
As an extra:
pacmd will throw an error:
No PulseAudio daemon running, or not running as session daemon.