CompTIA Linux+ (XK0-005) — Question 251

A senior Linux administrator has created several scripts that will be used to install common system applications. These scripts are published to a repository to share with the systems team. A junior Linux administrator needs to retrieve the scripts and make them available on a local workstation. Which of the following Git commands should the junior Linux administrator use to accomplish this task?

Answer options

Correct answer: C

Explanation

The correct answer is C, 'clone', as this command is specifically designed to create a local copy of a remote repository, including all its files. The other options do not fulfill this requirement: 'fetch' retrieves updates but does not create a local copy, 'checkout' is used to switch branches or restore files, and 'branch' is for creating or managing branches within a repository.