When using the ln command to create a link, which argument specifies the name of the link?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

When using the ln command to create a link, which argument specifies the name of the link?

Explanation:
When creating a link with ln, you provide the existing file as the first path and the desired name of the link as the second path. The name you give in that second position becomes the link’s filename in the location you’re creating it in. For example, ln /usr/bin/python3 python3-link creates a link named python3-link that points to /usr/bin/python3. The same idea applies to symbolic links with -s: ln -s /usr/bin/python3 python3-link. So the second argument is the link name, not the original target.

When creating a link with ln, you provide the existing file as the first path and the desired name of the link as the second path. The name you give in that second position becomes the link’s filename in the location you’re creating it in. For example, ln /usr/bin/python3 python3-link creates a link named python3-link that points to /usr/bin/python3. The same idea applies to symbolic links with -s: ln -s /usr/bin/python3 python3-link. So the second argument is the link name, not the original target.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy