CompTIA Linux+ (XK0-005) — Question 199
A Linux administrator needs to create a symlink for /usr/local/bin/app-a, which was installed in /usr/local/share/app-a. Which of the following commands should the administrator use?
Answer options
- A. ln -s /usr/local/bin/app-a /usr/local/share/app-a
- B. mv -f /usr/local/share/app-a /usr/local/bin/app-a
- C. cp -f /usr/local/share/app-a /usr/local/bin/app-a
- D. rsync -a/usr/local/share/app-a /usr/local/bin/app-a
Correct answer: A
Explanation
The correct command is A, as 'ln -s' creates a symbolic link pointing from the target location to the source. Options B and C attempt to move and copy files instead of creating a link, and option D uses 'rsync', which is also not intended for creating symlinks.