lchsh(1)
β¨ NAME β¨
lchsh β change your login shell, bestie π
It's like chsh but with an l in front, and it's from the libuser squad. Welcome to the lchsh(1) page, general commands manual edition π
πΈ SYNOPSIS πΈ
lchsh [OPTION]... [user]
That's it. Options, then maybe a user. Simple. Iconic. π¦
π DESCRIPTION π
Okay so here's the tea: lchsh displays the login shell of a user and lets you change it. That's the whole vibe. Shell glow-up service, no cap. β¨
Now, the user argument β if you don't hand it over, it just uses the username of whoever's running the command. The invoking user. That's you, babe. π«Ά
But listen β the user argument is straight-up ignored if lchsh is run set-uid to a different user. So don't think you're being sneaky. The program knows. π
And here's a lil detail that trips people up: at the "New Shell" prompt, if you just press Enter and give it an empty string? That's not "cancel", that's not "error", that's accepting the current value. You're saying "yeah, keep it, it's cute". π
π OPTIONS π
-i,--interactiveβ makes it ask all the questions when it's connecting to the user database, even if libuser's config already has default answers set up. Like, yes, I want to be asked, thank you. Main character energy. π
β EXIT STATUS β
0β success, we ate, everything's fine π1β error, we did not eat π
That's the whole scale. Binary. No in-between. Periodt.
π BUGS π
lchsh ignores /etc/shells.
Yep. Fr fr. It just does not care. If you were expecting it to check whether your shiny new shell is actually a legit listed shell before letting you set it β nope! It's giving "no thoughts, head empty". So be careful out there, bestie. π
This page comes to you from the libuser crew, dated Sep 20 2004 β yes, a vintage icon, still serving looks. π§ Stay slay, change those shells responsibly, and remember: empty string means keep the current one. Byeeee ππ
π¦ where this page comes from
- alpine 3.24: libuser-doc 0.64-r2 Β· LGPL-2.0-or-later
- centos-stream 10: libuser 0.64-12.el10 Β· LGPL-2.0-or-later
- centos-stream 9: libuser 0.63-17.el9 Β· LGPLv2+
- centos-stream 9: libuser 0.63-17.el9 Β· LGPLv2+
- debian bookworm: libuser 1:0.64~dfsg-1 Β· LGPL-2.0-or-later
- debian trixie: libuser 1:0.64+git20241106~dfsg-3 Β· LGPL-2.0-or-later
- fedora 43: libuser 0.64-16.fc43 Β· LGPL-2.0-or-later
- fedora 43: libuser 0.64-16.fc43 Β· LGPL-2.0-or-later
- fedora 44: libuser 0.64-17.fc44 Β· LGPL-2.0-or-later
- fedora 44: libuser 0.64-17.fc44 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- ubuntu jammy: libuser 1:0.63~dfsg-4build1 Β· LGPL-2.0-or-later
- ubuntu noble: libuser 1:0.64~dfsg-2build2 Β· LGPL-2.0-or-later
- ubuntu questing: libuser 1:0.64+git20241106~dfsg-3
- ubuntu resolute: libuser 1:0.64+git20241106~dfsg-4build1 Β· LGPL-2.0-or-later
- ubuntu stonking: libuser 1:0.64+git20241106~dfsg-4build1 Β· LGPL-2.0-or-later
- Copyright (C) 2004 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms