{
    "mode": "man",
    "parameter": "INSTALL",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/INSTALL/1/json",
    "generated": "2026-07-05T11:44:14Z",
    "synopsis": "install [OPTION]... [-T] SOURCE DEST\ninstall [OPTION]... SOURCE... DIRECTORY\ninstall [OPTION]... -t DIRECTORY SOURCE...\ninstall [OPTION]... -d DIRECTORY...",
    "sections": {
        "NAME": {
            "content": "install - copy files and set attributes\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "install [OPTION]... [-T] SOURCE DEST\ninstall [OPTION]... SOURCE... DIRECTORY\ninstall [OPTION]... -t DIRECTORY SOURCE...\ninstall [OPTION]... -d DIRECTORY...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  install  program  copies  files  (often  just  compiled) into destination locations you\nchoose.  If you want to download and install a ready-to-use package on  a  GNU/Linux  system,\nyou should instead be using a package manager like yum(1) or apt-get(1).\n\nIn  the  first  three forms, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIREC‐\nTORY, while setting permission modes and owner/group.  In the 4th form, create all components\nof the given DIRECTORY(ies).\n\nMandatory arguments to long options are mandatory for short options too.\n\n--backup[=CONTROL]\nmake a backup of each existing destination file\n",
            "subsections": [
                {
                    "name": "-b --backup",
                    "content": "",
                    "flag": "-b",
                    "long": "--backup"
                },
                {
                    "name": "-c     (ignored)",
                    "content": "",
                    "flag": "-c"
                },
                {
                    "name": "-C --compare",
                    "content": "compare  each  pair  of source and destination files, and in some cases, do not modify\nthe destination at all\n",
                    "flag": "-C",
                    "long": "--compare"
                },
                {
                    "name": "-d --directory",
                    "content": "treat all arguments as directory names; create all components of the specified  direc‐\ntories\n",
                    "flag": "-d",
                    "long": "--directory"
                },
                {
                    "name": "-D --tar",
                    "content": "get-directory, then copy SOURCE to DEST\n",
                    "flag": "-D",
                    "long": "--tar"
                },
                {
                    "name": "-g --group",
                    "content": "set group ownership, instead of process' current group\n",
                    "flag": "-g",
                    "long": "--group"
                },
                {
                    "name": "-m --mode",
                    "content": "set permission mode (as in chmod), instead of rwxr-xr-x\n",
                    "flag": "-m",
                    "long": "--mode"
                },
                {
                    "name": "-o --owner",
                    "content": "set ownership (super-user only)\n",
                    "flag": "-o",
                    "long": "--owner"
                },
                {
                    "name": "-p --preserve-timestamps",
                    "content": "apply access/modification times of SOURCE files to corresponding destination files\n",
                    "flag": "-p",
                    "long": "--preserve-timestamps"
                },
                {
                    "name": "-s --strip",
                    "content": "strip symbol tables\n\n--strip-program=PROGRAM\nprogram used to strip binaries\n",
                    "flag": "-s",
                    "long": "--strip"
                },
                {
                    "name": "-S --suffix",
                    "content": "override the usual backup suffix\n",
                    "flag": "-S",
                    "long": "--suffix"
                },
                {
                    "name": "-t --target-directory",
                    "content": "copy all SOURCE arguments into DIRECTORY\n",
                    "flag": "-t",
                    "long": "--target-directory"
                },
                {
                    "name": "-T --no-target-directory",
                    "content": "treat DEST as a normal file\n",
                    "flag": "-T",
                    "long": "--no-target-directory"
                },
                {
                    "name": "-v --verbose",
                    "content": "print the name of each directory as it is created\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "--preserve-context",
                    "content": "preserve SELinux security context\n",
                    "long": "--preserve-context"
                },
                {
                    "name": "-Z",
                    "content": "type\n\n--context[=CTX]\nlike -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX\n\n--help display this help and exit\n",
                    "flag": "-Z"
                },
                {
                    "name": "--version",
                    "content": "output version information and exit\n\nThe backup suffix is '~', unless set with --suffix or SIMPLEBACKUPSUFFIX.  The version con‐\ntrol method may be selected via the --backup option or through the  VERSIONCONTROL  environ‐\nment variable.  Here are the values:\n\nnone, off\nnever make backups (even if --backup is given)\n\nnumbered, t\nmake numbered backups\n\nexisting, nil\nnumbered if numbered backups exist, simple otherwise\n\nsimple, never\nalways make simple backups\n",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by David MacKenzie.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Full documentation <https://www.gnu.org/software/coreutils/install>\nor available locally via: info '(coreutils) install invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                  INSTALL(1)",
            "subsections": []
        }
    },
    "summary": "install - copy files and set attributes",
    "flags": [
        {
            "flag": "-b",
            "long": "--backup",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-C",
            "long": "--compare",
            "arg": null,
            "description": "compare each pair of source and destination files, and in some cases, do not modify the destination at all"
        },
        {
            "flag": "-d",
            "long": "--directory",
            "arg": null,
            "description": "treat all arguments as directory names; create all components of the specified direc‐ tories"
        },
        {
            "flag": "-D",
            "long": "--tar",
            "arg": null,
            "description": "get-directory, then copy SOURCE to DEST"
        },
        {
            "flag": "-g",
            "long": "--group",
            "arg": null,
            "description": "set group ownership, instead of process' current group"
        },
        {
            "flag": "-m",
            "long": "--mode",
            "arg": null,
            "description": "set permission mode (as in chmod), instead of rwxr-xr-x"
        },
        {
            "flag": "-o",
            "long": "--owner",
            "arg": null,
            "description": "set ownership (super-user only)"
        },
        {
            "flag": "-p",
            "long": "--preserve-timestamps",
            "arg": null,
            "description": "apply access/modification times of SOURCE files to corresponding destination files"
        },
        {
            "flag": "-s",
            "long": "--strip",
            "arg": null,
            "description": "strip symbol tables --strip-program=PROGRAM program used to strip binaries"
        },
        {
            "flag": "-S",
            "long": "--suffix",
            "arg": null,
            "description": "override the usual backup suffix"
        },
        {
            "flag": "-t",
            "long": "--target-directory",
            "arg": null,
            "description": "copy all SOURCE arguments into DIRECTORY"
        },
        {
            "flag": "-T",
            "long": "--no-target-directory",
            "arg": null,
            "description": "treat DEST as a normal file"
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "print the name of each directory as it is created"
        },
        {
            "flag": "",
            "long": "--preserve-context",
            "arg": null,
            "description": "preserve SELinux security context"
        },
        {
            "flag": "-Z",
            "long": null,
            "arg": null,
            "description": "type --context[=CTX] like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX --help display this help and exit"
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit The backup suffix is '~', unless set with --suffix or SIMPLEBACKUPSUFFIX. The version con‐ trol method may be selected via the --backup option or through the VERSIONCONTROL environ‐ ment variable. Here are the values: none, off never make backups (even if --backup is given) numbered, t make numbered backups existing, nil numbered if numbered backups exist, simple otherwise simple, never always make simple backups"
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Copy files and set attributes.",
        "examples": [
            {
                "description": "Copy files to the destination",
                "command": "install {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            },
            {
                "description": "Copy files to the destination, setting their ownership",
                "command": "install {{-o|--owner}} {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            },
            {
                "description": "Copy files to the destination, setting their group ownership",
                "command": "install {{-g|--group}} {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            },
            {
                "description": "Copy files to the destination, setting their `mode`",
                "command": "install {{-m|--mode}} {{+x}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            },
            {
                "description": "Copy files and apply access/modification times of source to the destination",
                "command": "install {{-p|--preserve-timestamps}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            },
            {
                "description": "Copy files and create the directories at the destination if they don't exist",
                "command": "install -D {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}"
            }
        ]
    }
}