Set volume from terminal

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
69
down vote

favorite
18












Is it possible to set the audio volume using the terminal instead of clicking the speaker icon in the top bar?



The reason I want to do this is that my keyboard does not have volume increase/decrease buttons and I find it annoying to reach for the mouse.










share|improve this question



























    up vote
    69
    down vote

    favorite
    18












    Is it possible to set the audio volume using the terminal instead of clicking the speaker icon in the top bar?



    The reason I want to do this is that my keyboard does not have volume increase/decrease buttons and I find it annoying to reach for the mouse.










    share|improve this question

























      up vote
      69
      down vote

      favorite
      18









      up vote
      69
      down vote

      favorite
      18






      18





      Is it possible to set the audio volume using the terminal instead of clicking the speaker icon in the top bar?



      The reason I want to do this is that my keyboard does not have volume increase/decrease buttons and I find it annoying to reach for the mouse.










      share|improve this question















      Is it possible to set the audio volume using the terminal instead of clicking the speaker icon in the top bar?



      The reason I want to do this is that my keyboard does not have volume increase/decrease buttons and I find it annoying to reach for the mouse.







      command-line audio linux-mint






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Matthias Braun

      1,70711120




      1,70711120










      asked Feb 20 '12 at 17:38









      Tristian

      5371610




      5371610




















          7 Answers
          7






          active

          oldest

          votes

















          up vote
          80
          down vote



          accepted










          For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.



          alsamixer is included by default in most systems.




          To set the master volume use:



          # Gets a list of simple mixer controls
          $ amixer scontrols


          Then set it to the desired volume, as an example



          $ amixer sset 'Master' 50%





          share|improve this answer


















          • 1




            What is the different between "sset" and just "set". (I tried both, and both work)
            – Venryx
            Dec 6 '17 at 21:39










          • @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
            – Matthias Braun
            yesterday

















          up vote
          32
          down vote













          Found in Openbox's configuration file rc.xml:



          # increase by 3%
          amixer -q sset Master 3%+

          # decrease by 3%
          amixer -q sset Master 3%-

          # mute/unmute
          amixer -q sset Master toggle


          amixer manual page can give more details.






          share|improve this answer



























            up vote
            16
            down vote













            If your system is using pulseaudio you could use pactl:



            pactl set-sink-volume 0 +15%


            or



            pactl set-sink-volume 0 -5dB


            though you could also specify an integer or a linear factor:



            set-sink-volume SINK VOLUME [VOLUME ...]
            Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be speci‐
            fied as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a
            decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be
            relative to the current sink volume. A single volume value affects all channels; if multiple volume values are
            given their number has to match the sink's number of channels.





            share|improve this answer
















            • 2




              Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
              – Jamie Cockburn
              Aug 25 '15 at 8:01






            • 2




              @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
              – don_crissti
              Aug 25 '15 at 10:02











            • Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
              – Jamie Cockburn
              Aug 25 '15 at 10:58






            • 1




              @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
              – don_crissti
              Aug 25 '15 at 11:08






            • 1




              @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
              – Reishin
              Feb 15 '16 at 15:47

















            up vote
            7
            down vote













            I know this is an old one. Since Alsa and pulseaudio are so connected, this awnser from askubuntu: https://askubuntu.com/a/444183 helped me to manage the volume from both my main sound and the HDMI:



            increase volume



            amixer -q -D pulse sset Master 10%+


            decrease volume



            amixer -q -D pulse sset Master 10%-


            toggle mute



            amixer -q -D pulse sset Master toggle


            Other amixer sset commands works too.






            share|improve this answer





























              up vote
              6
              down vote













              In OS X use the following:



              # highest
              osascript -e "set Volume 7"
              # lowest
              osascript -e "set Volume 1"
              # middle
              osascript -e "set Volume 3.5"


              You can even set the volume to other fractional levels:



              # 25%
              osascript -e "set Volume 1.75"





              share|improve this answer






















              • Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                – Wildcard
                Feb 17 '16 at 8:04










              • @Wildcard the Mac volume buttons are only in increments of 0.25
                – 1''
                Sep 7 '16 at 2:35

















              up vote
              5
              down vote













              These are "more natural for human ear".



              To get the master in the alsamixer units, use:



              amixer -M get Master


              To raise the volume by 5% in the alsamixer units, for example:



              amixer -M set Master 5%+


              https://bbs.archlinux.org/viewtopic.php?id=135348






              share|improve this answer





























                up vote
                4
                down vote













                you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.






                share|improve this answer




















                  Your Answer







                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "106"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  convertImagesToLinks: false,
                  noModals: false,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                   

                  draft saved


                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f32206%2fset-volume-from-terminal%23new-answer', 'question_page');

                  );

                  Post as a guest






























                  7 Answers
                  7






                  active

                  oldest

                  votes








                  7 Answers
                  7






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes








                  up vote
                  80
                  down vote



                  accepted










                  For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.



                  alsamixer is included by default in most systems.




                  To set the master volume use:



                  # Gets a list of simple mixer controls
                  $ amixer scontrols


                  Then set it to the desired volume, as an example



                  $ amixer sset 'Master' 50%





                  share|improve this answer


















                  • 1




                    What is the different between "sset" and just "set". (I tried both, and both work)
                    – Venryx
                    Dec 6 '17 at 21:39










                  • @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                    – Matthias Braun
                    yesterday














                  up vote
                  80
                  down vote



                  accepted










                  For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.



                  alsamixer is included by default in most systems.




                  To set the master volume use:



                  # Gets a list of simple mixer controls
                  $ amixer scontrols


                  Then set it to the desired volume, as an example



                  $ amixer sset 'Master' 50%





                  share|improve this answer


















                  • 1




                    What is the different between "sset" and just "set". (I tried both, and both work)
                    – Venryx
                    Dec 6 '17 at 21:39










                  • @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                    – Matthias Braun
                    yesterday












                  up vote
                  80
                  down vote



                  accepted







                  up vote
                  80
                  down vote



                  accepted






                  For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.



                  alsamixer is included by default in most systems.




                  To set the master volume use:



                  # Gets a list of simple mixer controls
                  $ amixer scontrols


                  Then set it to the desired volume, as an example



                  $ amixer sset 'Master' 50%





                  share|improve this answer














                  For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.



                  alsamixer is included by default in most systems.




                  To set the master volume use:



                  # Gets a list of simple mixer controls
                  $ amixer scontrols


                  Then set it to the desired volume, as an example



                  $ amixer sset 'Master' 50%






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 20 '12 at 18:00









                  Tristian

                  5371610




                  5371610










                  answered Feb 20 '12 at 17:40









                  Renan

                  14.2k65274




                  14.2k65274







                  • 1




                    What is the different between "sset" and just "set". (I tried both, and both work)
                    – Venryx
                    Dec 6 '17 at 21:39










                  • @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                    – Matthias Braun
                    yesterday












                  • 1




                    What is the different between "sset" and just "set". (I tried both, and both work)
                    – Venryx
                    Dec 6 '17 at 21:39










                  • @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                    – Matthias Braun
                    yesterday







                  1




                  1




                  What is the different between "sset" and just "set". (I tried both, and both work)
                  – Venryx
                  Dec 6 '17 at 21:39




                  What is the different between "sset" and just "set". (I tried both, and both work)
                  – Venryx
                  Dec 6 '17 at 21:39












                  @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                  – Matthias Braun
                  yesterday




                  @Venryx man amixer suggests that the they are equivalent and that the "s" in "sset" stands for "simple". There's also a "cset" that sets card control contents.
                  – Matthias Braun
                  yesterday












                  up vote
                  32
                  down vote













                  Found in Openbox's configuration file rc.xml:



                  # increase by 3%
                  amixer -q sset Master 3%+

                  # decrease by 3%
                  amixer -q sset Master 3%-

                  # mute/unmute
                  amixer -q sset Master toggle


                  amixer manual page can give more details.






                  share|improve this answer
























                    up vote
                    32
                    down vote













                    Found in Openbox's configuration file rc.xml:



                    # increase by 3%
                    amixer -q sset Master 3%+

                    # decrease by 3%
                    amixer -q sset Master 3%-

                    # mute/unmute
                    amixer -q sset Master toggle


                    amixer manual page can give more details.






                    share|improve this answer






















                      up vote
                      32
                      down vote










                      up vote
                      32
                      down vote









                      Found in Openbox's configuration file rc.xml:



                      # increase by 3%
                      amixer -q sset Master 3%+

                      # decrease by 3%
                      amixer -q sset Master 3%-

                      # mute/unmute
                      amixer -q sset Master toggle


                      amixer manual page can give more details.






                      share|improve this answer












                      Found in Openbox's configuration file rc.xml:



                      # increase by 3%
                      amixer -q sset Master 3%+

                      # decrease by 3%
                      amixer -q sset Master 3%-

                      # mute/unmute
                      amixer -q sset Master toggle


                      amixer manual page can give more details.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Feb 20 '12 at 17:59









                      enzotib

                      32.7k710292




                      32.7k710292




















                          up vote
                          16
                          down vote













                          If your system is using pulseaudio you could use pactl:



                          pactl set-sink-volume 0 +15%


                          or



                          pactl set-sink-volume 0 -5dB


                          though you could also specify an integer or a linear factor:



                          set-sink-volume SINK VOLUME [VOLUME ...]
                          Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be speci‐
                          fied as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a
                          decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be
                          relative to the current sink volume. A single volume value affects all channels; if multiple volume values are
                          given their number has to match the sink's number of channels.





                          share|improve this answer
















                          • 2




                            Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                            – Jamie Cockburn
                            Aug 25 '15 at 8:01






                          • 2




                            @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                            – don_crissti
                            Aug 25 '15 at 10:02











                          • Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                            – Jamie Cockburn
                            Aug 25 '15 at 10:58






                          • 1




                            @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                            – don_crissti
                            Aug 25 '15 at 11:08






                          • 1




                            @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                            – Reishin
                            Feb 15 '16 at 15:47














                          up vote
                          16
                          down vote













                          If your system is using pulseaudio you could use pactl:



                          pactl set-sink-volume 0 +15%


                          or



                          pactl set-sink-volume 0 -5dB


                          though you could also specify an integer or a linear factor:



                          set-sink-volume SINK VOLUME [VOLUME ...]
                          Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be speci‐
                          fied as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a
                          decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be
                          relative to the current sink volume. A single volume value affects all channels; if multiple volume values are
                          given their number has to match the sink's number of channels.





                          share|improve this answer
















                          • 2




                            Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                            – Jamie Cockburn
                            Aug 25 '15 at 8:01






                          • 2




                            @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                            – don_crissti
                            Aug 25 '15 at 10:02











                          • Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                            – Jamie Cockburn
                            Aug 25 '15 at 10:58






                          • 1




                            @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                            – don_crissti
                            Aug 25 '15 at 11:08






                          • 1




                            @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                            – Reishin
                            Feb 15 '16 at 15:47












                          up vote
                          16
                          down vote










                          up vote
                          16
                          down vote









                          If your system is using pulseaudio you could use pactl:



                          pactl set-sink-volume 0 +15%


                          or



                          pactl set-sink-volume 0 -5dB


                          though you could also specify an integer or a linear factor:



                          set-sink-volume SINK VOLUME [VOLUME ...]
                          Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be speci‐
                          fied as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a
                          decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be
                          relative to the current sink volume. A single volume value affects all channels; if multiple volume values are
                          given their number has to match the sink's number of channels.





                          share|improve this answer












                          If your system is using pulseaudio you could use pactl:



                          pactl set-sink-volume 0 +15%


                          or



                          pactl set-sink-volume 0 -5dB


                          though you could also specify an integer or a linear factor:



                          set-sink-volume SINK VOLUME [VOLUME ...]
                          Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be speci‐
                          fied as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a
                          decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be
                          relative to the current sink volume. A single volume value affects all channels; if multiple volume values are
                          given their number has to match the sink's number of channels.






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 12 '15 at 23:08









                          don_crissti

                          47.6k15126155




                          47.6k15126155







                          • 2




                            Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                            – Jamie Cockburn
                            Aug 25 '15 at 8:01






                          • 2




                            @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                            – don_crissti
                            Aug 25 '15 at 10:02











                          • Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                            – Jamie Cockburn
                            Aug 25 '15 at 10:58






                          • 1




                            @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                            – don_crissti
                            Aug 25 '15 at 11:08






                          • 1




                            @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                            – Reishin
                            Feb 15 '16 at 15:47












                          • 2




                            Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                            – Jamie Cockburn
                            Aug 25 '15 at 8:01






                          • 2




                            @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                            – don_crissti
                            Aug 25 '15 at 10:02











                          • Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                            – Jamie Cockburn
                            Aug 25 '15 at 10:58






                          • 1




                            @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                            – don_crissti
                            Aug 25 '15 at 11:08






                          • 1




                            @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                            – Reishin
                            Feb 15 '16 at 15:47







                          2




                          2




                          Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                          – Jamie Cockburn
                          Aug 25 '15 at 8:01




                          Note from arch linux wiki: pactl commands that take negative percentage arguments will fail with an 'invalid option' error. Use the standard shell -- pseudo argument to disable argument parsing before the negative argument. e.g. pactl set-sink-volume 1 -- -5%
                          – Jamie Cockburn
                          Aug 25 '15 at 8:01




                          2




                          2




                          @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                          – don_crissti
                          Aug 25 '15 at 10:02





                          @JamieCockburn - I'm not sure when was that written but I use archlinux and there is absolutely no need for the additional -- with negative values (percentage, db, integers... they all work fine). In fact, it's quite the opposite: if I use -- as per the wiki e.g. pactl set-sink-volume 1 -- -3% I get Invalid volume specification.
                          – don_crissti
                          Aug 25 '15 at 10:02













                          Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                          – Jamie Cockburn
                          Aug 25 '15 at 10:58




                          Must be dependent on shell then? I'm on ubuntu 14.04, with Xfce, and running the command from bash (4.3.11). If I omit the --, I get an invalid option.
                          – Jamie Cockburn
                          Aug 25 '15 at 10:58




                          1




                          1




                          @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                          – don_crissti
                          Aug 25 '15 at 11:08




                          @JamieCockburn - I don 't think the shell is relevant (for the record, it works fine for me with both bash and zsh). Probably earlier versions of pactl had this problem and upstream most likely fixed it (I'm using v. 6.0).
                          – don_crissti
                          Aug 25 '15 at 11:08




                          1




                          1




                          @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                          – Reishin
                          Feb 15 '16 at 15:47




                          @JamieCockburn i'm running ubuntu 16.04 xfce bash, and it works perfectly witout "--", just a note.
                          – Reishin
                          Feb 15 '16 at 15:47










                          up vote
                          7
                          down vote













                          I know this is an old one. Since Alsa and pulseaudio are so connected, this awnser from askubuntu: https://askubuntu.com/a/444183 helped me to manage the volume from both my main sound and the HDMI:



                          increase volume



                          amixer -q -D pulse sset Master 10%+


                          decrease volume



                          amixer -q -D pulse sset Master 10%-


                          toggle mute



                          amixer -q -D pulse sset Master toggle


                          Other amixer sset commands works too.






                          share|improve this answer


























                            up vote
                            7
                            down vote













                            I know this is an old one. Since Alsa and pulseaudio are so connected, this awnser from askubuntu: https://askubuntu.com/a/444183 helped me to manage the volume from both my main sound and the HDMI:



                            increase volume



                            amixer -q -D pulse sset Master 10%+


                            decrease volume



                            amixer -q -D pulse sset Master 10%-


                            toggle mute



                            amixer -q -D pulse sset Master toggle


                            Other amixer sset commands works too.






                            share|improve this answer
























                              up vote
                              7
                              down vote










                              up vote
                              7
                              down vote









                              I know this is an old one. Since Alsa and pulseaudio are so connected, this awnser from askubuntu: https://askubuntu.com/a/444183 helped me to manage the volume from both my main sound and the HDMI:



                              increase volume



                              amixer -q -D pulse sset Master 10%+


                              decrease volume



                              amixer -q -D pulse sset Master 10%-


                              toggle mute



                              amixer -q -D pulse sset Master toggle


                              Other amixer sset commands works too.






                              share|improve this answer














                              I know this is an old one. Since Alsa and pulseaudio are so connected, this awnser from askubuntu: https://askubuntu.com/a/444183 helped me to manage the volume from both my main sound and the HDMI:



                              increase volume



                              amixer -q -D pulse sset Master 10%+


                              decrease volume



                              amixer -q -D pulse sset Master 10%-


                              toggle mute



                              amixer -q -D pulse sset Master toggle


                              Other amixer sset commands works too.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Apr 13 '17 at 12:22









                              Community♦

                              1




                              1










                              answered Mar 25 '16 at 4:34









                              Mathter

                              17113




                              17113




















                                  up vote
                                  6
                                  down vote













                                  In OS X use the following:



                                  # highest
                                  osascript -e "set Volume 7"
                                  # lowest
                                  osascript -e "set Volume 1"
                                  # middle
                                  osascript -e "set Volume 3.5"


                                  You can even set the volume to other fractional levels:



                                  # 25%
                                  osascript -e "set Volume 1.75"





                                  share|improve this answer






















                                  • Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                    – Wildcard
                                    Feb 17 '16 at 8:04










                                  • @Wildcard the Mac volume buttons are only in increments of 0.25
                                    – 1''
                                    Sep 7 '16 at 2:35














                                  up vote
                                  6
                                  down vote













                                  In OS X use the following:



                                  # highest
                                  osascript -e "set Volume 7"
                                  # lowest
                                  osascript -e "set Volume 1"
                                  # middle
                                  osascript -e "set Volume 3.5"


                                  You can even set the volume to other fractional levels:



                                  # 25%
                                  osascript -e "set Volume 1.75"





                                  share|improve this answer






















                                  • Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                    – Wildcard
                                    Feb 17 '16 at 8:04










                                  • @Wildcard the Mac volume buttons are only in increments of 0.25
                                    – 1''
                                    Sep 7 '16 at 2:35












                                  up vote
                                  6
                                  down vote










                                  up vote
                                  6
                                  down vote









                                  In OS X use the following:



                                  # highest
                                  osascript -e "set Volume 7"
                                  # lowest
                                  osascript -e "set Volume 1"
                                  # middle
                                  osascript -e "set Volume 3.5"


                                  You can even set the volume to other fractional levels:



                                  # 25%
                                  osascript -e "set Volume 1.75"





                                  share|improve this answer














                                  In OS X use the following:



                                  # highest
                                  osascript -e "set Volume 7"
                                  # lowest
                                  osascript -e "set Volume 1"
                                  # middle
                                  osascript -e "set Volume 3.5"


                                  You can even set the volume to other fractional levels:



                                  # 25%
                                  osascript -e "set Volume 1.75"






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Feb 17 '16 at 7:30









                                  Community♦

                                  1




                                  1










                                  answered May 7 '15 at 9:49









                                  1''

                                  24736




                                  24736











                                  • Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                    – Wildcard
                                    Feb 17 '16 at 8:04










                                  • @Wildcard the Mac volume buttons are only in increments of 0.25
                                    – 1''
                                    Sep 7 '16 at 2:35
















                                  • Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                    – Wildcard
                                    Feb 17 '16 at 8:04










                                  • @Wildcard the Mac volume buttons are only in increments of 0.25
                                    – 1''
                                    Sep 7 '16 at 2:35















                                  Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                  – Wildcard
                                  Feb 17 '16 at 8:04




                                  Worth noting that you can also use the Mac volume buttons to change volume by fractional increments.
                                  – Wildcard
                                  Feb 17 '16 at 8:04












                                  @Wildcard the Mac volume buttons are only in increments of 0.25
                                  – 1''
                                  Sep 7 '16 at 2:35




                                  @Wildcard the Mac volume buttons are only in increments of 0.25
                                  – 1''
                                  Sep 7 '16 at 2:35










                                  up vote
                                  5
                                  down vote













                                  These are "more natural for human ear".



                                  To get the master in the alsamixer units, use:



                                  amixer -M get Master


                                  To raise the volume by 5% in the alsamixer units, for example:



                                  amixer -M set Master 5%+


                                  https://bbs.archlinux.org/viewtopic.php?id=135348






                                  share|improve this answer


























                                    up vote
                                    5
                                    down vote













                                    These are "more natural for human ear".



                                    To get the master in the alsamixer units, use:



                                    amixer -M get Master


                                    To raise the volume by 5% in the alsamixer units, for example:



                                    amixer -M set Master 5%+


                                    https://bbs.archlinux.org/viewtopic.php?id=135348






                                    share|improve this answer
























                                      up vote
                                      5
                                      down vote










                                      up vote
                                      5
                                      down vote









                                      These are "more natural for human ear".



                                      To get the master in the alsamixer units, use:



                                      amixer -M get Master


                                      To raise the volume by 5% in the alsamixer units, for example:



                                      amixer -M set Master 5%+


                                      https://bbs.archlinux.org/viewtopic.php?id=135348






                                      share|improve this answer














                                      These are "more natural for human ear".



                                      To get the master in the alsamixer units, use:



                                      amixer -M get Master


                                      To raise the volume by 5% in the alsamixer units, for example:



                                      amixer -M set Master 5%+


                                      https://bbs.archlinux.org/viewtopic.php?id=135348







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Dec 14 '16 at 15:49









                                      sam

                                      12.6k31326




                                      12.6k31326










                                      answered Dec 14 '16 at 15:43









                                      Robson

                                      5111




                                      5111




















                                          up vote
                                          4
                                          down vote













                                          you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.






                                          share|improve this answer
























                                            up vote
                                            4
                                            down vote













                                            you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.






                                            share|improve this answer






















                                              up vote
                                              4
                                              down vote










                                              up vote
                                              4
                                              down vote









                                              you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.






                                              share|improve this answer












                                              you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Feb 20 '13 at 17:46









                                              fradeve

                                              634




                                              634



























                                                   

                                                  draft saved


                                                  draft discarded















































                                                   


                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f32206%2fset-volume-from-terminal%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest













































































                                                  Popular posts from this blog

                                                  How to check contact read email or not when send email to Individual?

                                                  Bahrain

                                                  Postfix configuration issue with fips on centos 7; mailgun relay