Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8000381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:46:31+00:00 2026-06-04T15:46:31+00:00

How do you programmatically change volume in Gnome on Ubuntu, either from the command

  • 0

How do you programmatically change volume in Gnome on Ubuntu, either from the command line or an API (Python preferrably)?

The only answers I found to similar questions use amixer, which seems to have no effect on Ubuntu 12.04. Running:

amixer set Headphone 10-

shows:

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 115
  Mono:
  Front Left: Playback 0 [57%] [-57.50dB] [on]
  Front Right: Playback 0 [57%] [-57.50dB] [on]

The x% changes each time I run it. Unfortunately, it has no effect on the actual volume. Eventually it says 0%, but volume is still at full blast.

The other downside is I have to specify the exact active output device, which I might not know if there are multiple devices. For example, if I have a “Master” and “Headphone”, how do I determine which one is the active device?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:46:32+00:00Added an answer on June 4, 2026 at 3:46 pm

    Ubuntu uses pulseaudio as sounderver. It can be controlled from the command line using the pactl and pacmd utilities, for example:

    pactl set-sink-volume 0 20%
    

    would set the volume of the sink #0 to 20%.

    see: man pactl and pacmd help


    edit:

    to avoid -xx being interpreted as command line option you must prefix it with --. That stops option parsing from that point:

    pactl set-sink-volume 0 -- -20%    # or:
    pactl -- set-sink-volume 0 -20%    # doesn't matter where the `--` goes
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to programmatically change a multi-line text field to single-line text field
I want to programmatically change the volume icon for a stacked file system implemented
How do I programatically change Volume Serial of a Fat32 partition from C#. I
Is there any way, in Python, to programmatically change the CAPS LOCK/NUM LOCK/SCROLL LOCK
I want to programmatically change formulas in a whole lot of reports, like in
I am trying to programmatically change a value of a wxRadioButton in a way
I was wondering if there is a way to programmatically change a stopgradient color
I need to be able to update my config file programmatically and change my
I'm new to android my question is, Is it possible to change orientation programmatically?
How to change iPhone APN (Access Point Name) programmatically? Or force a 3G/GPRS connection

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.