回答編集履歴

1

情報元のさらに情報元が見つかったのでご紹介します

2021/11/05 12:36

投稿

PROoJI3
PROoJI3

スコア9

test CHANGED
@@ -53,3 +53,45 @@
53
53
  ```
54
54
 
55
55
  とすることでうまくいきました。
56
+
57
+
58
+
59
+ ---
60
+
61
+ **追加情報**
62
+
63
+ 上記ご紹介しましたwebサイトの元ネタは以下の WebSite のようです。
64
+
65
+ [How can I change the default audio device from command line?](https://askubuntu.com/questions/14077/how-can-i-change-the-default-audio-device-from-command-line)
66
+
67
+ Ubuntu's desktop gui is great for changing audio settings (System->Preferences->Sound), like the default input/output device and setting the volume.
68
+
69
+
70
+
71
+ However, I would like to be able to do these things from the command-line. What tool is the gui using behind the scenes?
72
+
73
+ **Answer**
74
+
75
+ You can control PulseAudio thoroughly through the command line using pacmd and pactl commands. For options see pacmd --help or the wiki at PulseAudio:
76
+
77
+ ```shell
78
+
79
+ pacmd list-sinks for name or index number of possible sinks
80
+
81
+
82
+
83
+ pacmd list-sources for name or index number of possible sources
84
+
85
+
86
+
87
+ pacmd set-default-sink "SINKNAME" | index to set the default output sink
88
+
89
+
90
+
91
+ pacmd set-default-source "SOURCENAME" | index to set the default input
92
+
93
+
94
+
95
+ pacmd set-sink-volume index volume
96
+
97
+ ```