install command is used to copy files and set attributes. It is used to copy files to a destination of the user’s choice, If the user want to download and install a ready to use package on GNU/Linux system then he should use apt-get, apt, yum, etc depending on their distribution.
install [OPTION]... [-T] SOURCE DEST install [OPTION]... SOURCE... DIRECTORY install [OPTION]... -t DIRECTORY SOURCE... install [OPTION]... -d DIRECTORY...
Here, the first three forms are used to copy the SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY while setting permission modes and owner/group. But the fourth form is used to create all components of the given DIRECTORY.
- –backup[=CONTROL] : This option is used to create a backup of each existing destination file.
- -b : Like –backup but It will not accept an argument.
- -C, –compare : Used to compare each pair of source and destination files. But in some cases it does not modify the destination.
- -d, –directory : It will act as directory names towards all arguments. And create all components of the specified directories.
- -g, –group=GROUP : Used to set group ownership, instead of processing the current group.
- -m, –mode=MODE : Set permission mode (as in chmod).
- -o, –owner=OWNER : Set ownership (super-user only).
- -p, –preserve-timestamps : Apply access/modification times of SOURCE files to corresponding destination files
- -t, –target-directory=DIRECTORY : Copy all SOURCE arguments into DIRECTORY.
- -T, –no-target-directory : Treat DEST as a normal file.
- -v, –verbose : Used to show the name of each directory as it is created.
- –help : Display the help message and exit.
- –version : Shows the version information and exit.
- Copies two files rocket.c and rocket to directory demo.
- Compare and copies files(observe the difference).
- Using -T option(observe that it makes a file instead of directory).
- Changing owner and permissions.
- Printing version information.
- How to Install VirtualBox in Linux?
- How to Install Linux on Windows PowerShell Subsystem?
- How to Install Katoolin on Linux Mint?
- How to Install Lazy Script in Kali Linux?
- How to Install Z Shell(zsh) on Linux?
- How to Install and Configure Apache Subversion(SVN) In Linux?
- How to Install R Studio on Windows and Linux?
- How to Install Ruby on Rails on Windows and Linux?
- How to Install and Use Hydra in Linux?
- How to Install TeamViewer on Linux/Ubuntu?
- How to Install Kali Linux VirtualBox Image?
- 'IPCS' command in Linux with examples
- select command in Linux with examples
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Cat command in Linux with examples
- Head command in Linux with examples
- Tail command in Linux with examples
- wc command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.