GPIOSET(1)
π
GPIOSET(1) β the gpioset girlies' guide
okay so this is the manual for gpioset, a libgpiod command-line utility, and honestly it's kind of the main character of the libgpiod world. bestie, let's get into it β¨
πΈ NAME
gpioset β libgpiod command-line utility. that's it, that's the name, she's iconic like that π
π¦ SYNOPSIS
gpioset [OPTIONS] <line=value>...
β¨ DESCRIPTION
So what does she do? She sets values of GPIO lines. literally her whole job π
Lines are specified by name, or optionally by offset if the chip option is provided (that's -c/--chip, we'll get there). Values may be '1' or '0', or equivalently 'active'/'inactive' or 'on'/'off' β pick your fave, they all slay the same π
Now here's the lil caveat you need to know: the line output state is maintained until the process exits, but after that β not guaranteed. so like, she holds the vibe while she's on stage, but after she leaves? no promises, no cap π
π₯ OPTIONS
okay this is the part where we go through every single flag because we do NOT skip details in this house π
--bannerβ display a banner on successful startup. cute lil moment of celebration, we love a grand entrance β¨-b, --bias <bias>β specify the line bias. possible values:'pull-down','pull-up','disabled'. (default is to leave bias unchanged β she stays unbothered π )--by-nameβ treat lines as names even if they would parse as an offset. like, respect her identity please π«Ά-c, --chip <chip>β restrict scope to a particular chip. narrowing it down, we love a focused queen-C, --consumer <name>β consumer name applied to requested lines (default is'gpioset'). she's got a name tag π-d, --drive <drive>β specify the line drive mode. possible values:'push-pull','open-drain','open-source'. (default is'push-pull') π₯-h, --helpβ display this help and exit. the classic "wait what does this do again" button π-l, --active-lowβ treat the line as active low. flipping the whole vibe, lowkey iconic-p, --hold-period <period>β the minimum time period to hold lines at the requested values. hold the pose, bestie π§-s, --strictβ abort if requested line names are not unique. she does NOT tolerate duplicates, periodt π-t, --toggle <period>[,period]...β toggle the line(s) after the specified period(s). if the last period is0thengpiosetexits, else the sequence repeats π--unquotedβ don't quote line names. raw and unfiltered, we respect it-v, --versionβ output version information and exit π-z, --daemonizeβ set values then detach from the controlling terminal. she's leaving the group chat to go be mysterious π¦
π Chips
A GPIO chip may be identified by number, name, or path. e.g. '0', 'gpiochip0', and /dev/gpiochip0' all refer to the same chip. three looks, one girl, iykyk π
β±οΈ Periods
Periods are taken as milliseconds unless units are specified. e.g. 10us. supported units are 'm', 's', 'ms', and 'us' for minutes, seconds, milliseconds and microseconds respectively. so 10us is not a typo, it's a whole unit system πΈ
β NOTE
It should not be assumed that a line will retain its state aftergpiosetexits. When a process exits, any GPIO lines it has requested are automatically released. Once released, the state of a line may be modified by the kernel or another process. To guarantee the requested value, by defaultgpiosetdoes not exit.
so yeah β she stays on stage by default specifically so nothing messes with your values. respect the commitment π€
π AUTHOR
Bartosz Golaszewski <brgl@kernel.org> β the icon, the legend π
π REPORTING BUGS
found a bug? report it to:
Bartosz Golaszewski <brgl@kernel.org>
linux-gpio <linux-gpio@vger.kernel.org>
they want to hear about it, fr fr π«Ά
π COPYRIGHT
Copyright Β© 2017-2023 Bartosz Golaszewski
License: GPL-2.0-or-later
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (read that in all caps, it means it π¨)
and that's the whole page bestie β gpioset v2.3.2 (libgpiod v2.2.1), dated November 2026, signing off ππβ¨
π¦ where this page comes from
- arch rolling: libgpiod 2.3.2-1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later AND CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms