Skip to main content
Kill -9 Club
Sign in

install

FilesPackage: coreutils

Copies a file while setting owner, group and mode in one command — install -o root -g root -m 0644. It is cp then chown then chmod, without the window where the file has the wrong rights.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

install -m
The installed file’s mode, in octal, applied as part of the copy. install -m 640 avoids the window where the file exists with wider permissions before a chmod.
install -o
The installed file’s owner.
install -g
The installed file’s group.
install -d
Creates a directory instead of copying a file, with the given mode and owner set at creation. install -d -m 0700 opens an extraction directory without the window of a mkdir followed by a chmod.

Lessons that teach it