What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags





Commands using amixer from sorted by
Terminal - Commands using amixer - 10 results
(amixer get Master | grep off > /dev/null && amixer -q set Master unmute) || amixer -q set Master mute
amixer -c 0 set Master 1dB+
2013-07-25 15:28:45
User: chrisp6825
Functions: amixer set

adjusts the 'Master' channel's volume up by 1dB.

Can use command 'amixer' to see other channels :

Simple mixer control 'Master',0


Simple mixer control 'Capture',0

amixer -c 0 set Master 100%
2013-03-28 16:30:10
User: thewarden
Functions: amixer set

Replace "Master" with desired control name (e.g. Front, Earphone, PCM, etc.).

amixer -c 0 set Master toggle | tail -1 | awk '{print $4}' | sed "s/[^0-9]//g" ; amixer -c 0 set Speaker toggle >/dev/null; amixer -c 0 set Front toggle >/dev/null
amixer -c 0 set Master toggle | sed -n "$ p" | awk '{print $4}' | sed "s/[^0-9]//g"
check(){ power=$(acpi -a) ; if [[ $power == *on-line* ]] ; then echo "supply is on"; else echo "somebody is steeling your laptop"; amixer -c0 set Master 100+ unmute ; mpg123 nuclear-alarm.mp3 ; fi } ;while true; do check ; sleep 2 ; done
2011-12-10 13:42:52
User: hoodie

Checks whether your power supply is still plugged in.

If not it will trigger an alarm at maximum volume.

sleep 3600; amixer set Master mute
2011-02-06 03:14:33
User: kenbarbour
Functions: amixer set sleep

Mutes the speakers after an hour, in case you fall asleep watching a video...

amixer sset Master toggle
on="off"; off="on"; now=$(amixer get Master | tr -d '[]' | grep "Playback.*%" |head -n1 |awk '{print $7}'); amixer sset Master ${!now}
amixer -c 0 set PCM 2dB+
2009-02-22 22:06:46
User: Fate
Functions: amixer set
Tags: audio

this will increase the volume by 2 decibels on the pcm channel. the argument to -c is for which sound card to use, the arg after set is the channel (PCM, Master, etc.) and what to set by.

related commands:

amixer -c 0 set PCM 2dB-

decrease volume by 2 decibels

amixer -c 0 set PCM toggle

toggle mute/unmute

this is for alsa systems

for mac os (and maybe other UNIX systems) osascript -e 'set Volume *' where * is any number (can have decimal points) between 0 and 10