install
copies files while setting permissions and ownership
TLDR
SYNOPSIS
install [options] [-s] [--strip-program=PROGRAM] source... destinstall [options] -t DIRECTORY source...install [options] -d directories...
DESCRIPTION
install copies files while setting permissions and ownership. It is primarily used in Makefiles and installation scripts to place files with correct attributes.The tool combines cp, chmod, chown, and mkdir functionality, streamlining installation tasks. It can also strip binaries and back up existing files. The default permission mode is rwxr-xr-x (755).
PARAMETERS
-m mode, --mode=mode
Set permission mode (as in chmod), instead of the default rwxr-xr-x.-o owner, --owner=owner
Set ownership (super-user only).-g group, --group=group
Set group ownership instead of the process's current group.-d, --directory
Treat all arguments as directory names; create all components of the specified directories.-D
Create all leading parent directory components of dest, then copy source to dest.-t DIRECTORY, --target-directory=DIRECTORY
Copy all source arguments into DIRECTORY.-T, --no-target-directory
Treat dest as a normal file, not a directory.-C, --compare
Compare source and destination; do not modify dest if content, ownership, and permissions are unchanged.-s, --strip
Strip symbol tables from installed binaries.--strip-program=PROGRAM
Program used to strip binaries (default: strip).-p, --preserve-timestamps
Apply access/modification times of source files to destination files.-b
Make a backup of each existing destination file.--backup[=CONTROL]
Make a backup of each existing destination file, with optional version control method.-S suffix, --suffix=suffix
Override the usual backup suffix.-v, --verbose
Print the name of each file or directory as it is created.-c
Ignored; for compatibility with older Unix versions.-Z, --context
Set SELinux security context of destination files to the default type.
CAVEATS
Not intended for general file copying. The default permission mode is 755 (rwxr-xr-x), unlike cp which preserves source permissions. Requires appropriate privileges for ownership changes.
HISTORY
install is a traditional Unix utility, part of GNU coreutils on Linux. It has been used in Makefiles since early Unix for standardized software installation procedures.
