How to List Symbolic Links in a Linux Directory

In this article, we are going to explain the various methods of listing all the symbolic links in a given Linux directory.

How to List Symbolic Links in a Linux Directory

This tutorial is based on Debian 12 alpha1, codename Bookworm. However, this tutorial will work any version of GNU/Linux.

Symbolic links, also known as soft links are file types that points to the location of another directory or file within the filesystem. They are essential files available in any Linux systems. They can allow you to remove the need to type the full path to a given file or directory. They can also allow you to link various tools and services in simple commands.

Let us start at the root level and discuss how we can list all the soft link in the entire filesystem. For that, we can use the find command in the / directory.

To narrow down the search, we need to pass the type parameter as -l which denotes soft links.

The command is as provided below:

sudo find / -type l



NOTE: There a lot of soft links in the linux filesystem. Use tools such as awk or grep to locate files matching a specific pattern.

Method 2 - List All Symbolic Files in the Current Working Directory.

Another method to narrow down your search is to list all the files in your current working directory. For that, you can change the search location for the find command to the current directory as:

sudo find . -type l


cd /etc
sudo find . type -l

The command lists all the soft links in the /etc directory as:


You can also provide an absolute path to a target directory to show the symbolic links. The command syntax is as listed below:

sudo find /path/to/directory -type l 


sudo find /var -type l





This tutorial guided you through simple method of listing symbolic links in the entire filesystem, the curent directory, or any target directory without your filesystem.

Leave us a comment down below and share!!

If you enjoy our content, please consider buying us a coffee to support our work:

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.