INSTALL(1) General Commands Manual INSTALL(1)

installinstall binaries

install [-CcDpTv] [-g group] [-m mode] [-o owner] source... destination

install [-CcDpTv] [-g group] [-m mode] [-o owner] -t destination source...

install -d [-cv] [-g group] [-m mode] [-o owner] directory...

install copies the given source files to destination. If destination is a directory then source is copied into destination with its original filename, otherwise if it already exists, it is removed.

The mode of destination is set to 755 unless -m mode is specified.

Ignored, for compatibility with other implementations.
Copy the file, default behavior in all modern implementations.
Create directories, including their parents.
Create parent directories for destination.
Note that this option isn't portable, as FreeBSD and NetBSD implementation of install takes an argument like so: -D destdir
group
Sets group ownership.
mode
Sets alternative mode. The default mode is set to ‘0755/rwr-xr-x’.
owner
Sets user ownership.
Preserve file access and modification times.
destination
Use destination as directory to copy each source into.
Treat destination as a normal file. Which asserts a single source operand.
print the name of each created file or directory

The install utility exits 0 on success, and >0 if an error occurs.

The install utility appeared in 4.2BSD.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

2024-05-01 Linux 6.6.67-gentoo-x86_64