Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Working with Links in Linux

Understanding how soft and hard links work within Linux is another important skill for a system administrator. This learning activity will help you practice creating these two types of links on a file system, and explore the differences between the two.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Sep 05, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create a Symbolic (soft) Link

    Using the ln command, create a symbolic link from the file /etc/redhat-release to a new link file named release in the cloud_user's home directory. Using the ls command, verify that the link is valid. Use the cat command on the /home/cloud_user/release file to verify its contents.

    Can be completed with:

    ln -s /etc/redhat-release release
    
    ls -l
    
    cat /etc/redhat-release
    
  2. Challenge

    Check the Inode Numbers for the Link

    Using the ls command, first look at the inode number for the /home/cloud_user/release link and then check the inode number for /etc/redhat-release. They should be different, as the symbolic link is just a new file system entry that references the original file.

    Viewing the inodes can be done via:

    ls -i release
    
    ls -i /etc/redhat-release
    
  3. Challenge

    Create a Hard Link

    Create a directory called docs in your home directory. Copy the /etc/services file into this new docs directory. Using the ln command again, create a hard link from /home/cloud_user/docs/services to a link file named /home/cloud_user/services. Use the ls command to verify the link's inode number, and the inode number for the original /etc/services file.

    The commands to accomplish this task are:

    mkdir docs
    
    cp /etc/services docs/
    
    ln docs/services services
    
    ls -l
    
    ls -i services
    
    ls -i docs/services
    
  4. Challenge

    Attempt to Create a Hard Link Across File Systems

    Using the ln command, attempt to make a hard link from /home/cloud_user/docs/services to /opt/services (you will have write permissions to this location). Why does this not work?

    To see the behavior of this task, try the following:

    lsblk 
    
    ln docs/services /opt/services
    
  5. Challenge

    Attempt to Create a Symbolic Link Across File Systems

    Once more using the ln command, attempt to create a soft link from /etc/redhat-release to /opt/release. Why does this work, but creating a hard link fails? Turn the system over for grading when complete.

    Creating the soft link should succeed, even across filesystems, like so:

    sudo ln -s /etc/redhat-release /opt/release
    
    ls -i /etc/redhat-release
    
    ls -i /opt/release
    
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight