{
    "content": [
        {
            "type": "text",
            "text": "# chsh (info)\n\n## NAME\n\nchsh - change login shell\n\n## SYNOPSIS\n\nchsh [options] [LOGIN]\n\n## DESCRIPTION\n\nThe chsh command changes the user login shell. This determines the name\nof the user's initial login command. A normal user may only change the\nlogin shell for her own account; the superuser may change the login\nshell for any account.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (1 subsections)\n- **NOTE**\n- **FILES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "chsh",
        "section": "",
        "mode": "info",
        "summary": "chsh - change login shell",
        "synopsis": "chsh [options] [LOGIN]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help message and exit. -R, --root CHROOTDIR Apply changes in the CHROOTDIR directory and use the configuration files from the CHROOTDIR directory. -s, --shell SHELL The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell. If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "chfn",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/chfn/1/json"
            },
            {
                "name": "login.defs",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/login.defs/5/json"
            },
            {
                "name": "passwd",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/passwd/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-h, --help",
                        "lines": 15,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "NOTE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "chsh - change login shell\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "chsh [options] [LOGIN]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The chsh command changes the user login shell. This determines the name\nof the user's initial login command. A normal user may only change the\nlogin shell for her own account; the superuser may change the login\nshell for any account.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The options which apply to the chsh command are:\n",
                "subsections": [
                    {
                        "name": "-h, --help",
                        "content": "Display help message and exit.\n\n-R, --root CHROOTDIR\nApply changes in the CHROOTDIR directory and use the configuration\nfiles from the CHROOTDIR directory.\n\n-s, --shell SHELL\nThe name of the user's new login shell. Setting this field to blank\ncauses the system to select the default login shell.\n\nIf the -s option is not selected, chsh operates in an interactive\nfashion, prompting the user with the current login shell. Enter the new\nvalue to change the shell, or leave the line blank to use the current\none. The current shell is displayed between a pair of [ ] marks.\n",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "NOTE": {
                "content": "The only restriction placed on the login shell is that the command name\nmust be listed in /etc/shells, unless the invoker is the superuser, and\nthen any value may be added. An account with a restricted login shell\nmay not change her login shell. For this reason, placing /bin/rsh in\n/etc/shells is discouraged since accidentally changing to a restricted\nshell would prevent the user from ever changing her login shell back to\nits original value.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/etc/passwd\nUser account information.\n\n/etc/shells\nList of valid login shells.\n\n/etc/login.defs\nShadow password suite configuration.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "chfn(1), login.defs(5), passwd(5).\n\nshadow-utils 4.8.1                02/06/2024                           CHSH(1)",
                "subsections": []
            }
        }
    }
}