Using Symbolic Links

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will practice using symbolic links. Understanding and using symbolic links is a fundamental skill for Linux system administration.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create the ~/ bin Directory and Add it to the PATH
  1. Make the ~/bin directory.
    mkdir bin
  2. Add ~/bin to the $PATH environment variable.
    echo 'PATH=$HOME/bin:$PATH' >> .bashrc
Create the Symbolic Links
  1. Create a symbolic link ("symlink") for rpm_verify.
    ln -s /usr/lib/rpm/rpmdb_verify bin/rpm_verify
  2. Create a symlink for rpm_dump.
    ln -s /usr/lib/rpm/rpmdb_dump bin/rpm_dump
  3. Create a symlink for rpm_load.
    ln -s /usr/lib/rpm/rpmdb_load bin/rpm_load
Test the Symbolic Links
  1. Verify that the rpm_verify symlink works.
    rpm_verify /var/lib/rpm/Packages

Additional Resources

One of your coworkers just said, “I wish I could just use rpm_verify, rpm_dump, and rpm_load to run these commands without having to do so much typing!”

Determine how to use symbolic links and the $PATH environment variable to make running these commands as easy as they’ve suggested.

The commands they are running are:

  • /usr/lib/rpm/rpmdb_verify
  • /usr/lib/rpm/rpmdb_dump
  • /usr/lib/rpm/rpmdb_load

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?