Red Hat Certified System Administrator RHCSA · Free Practice Question Medium

Question 38

How can you create a hard link to a file in a Red Hat Enterprise Linux 9 system?

Show model answer

To create a hard link in RHEL 9, open the terminal and use the ln command followed by the source file and the desired link name. For example, ln source_file.txt hard_link.txt creates a hard link named 'hard_link.txt' to 'source_file.txt'. Remember, hard links cannot cross file systems and don't work with directories. This method links directly to the inode of the file, allowing the linked file to act as an alias of the original, with both having equal privileges and modifications reflected in both.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need