A symbolic link also known as a soft link is a kind of a pointer that points to the location of a folder or a file on your system. Some of these links are created by default on your system, whereas you yourself can also create symbolic links manually for any of your desired files or folders. This article will explain to you the different methods through which you can list down all symbolic links on Linux, I have used Linux Mint 20 for this guide, but the same steps will work on any Linux distribution.

Three Ways of listing Symbolic Links on Linux

For listing down all the symbolic links in Linux Mint 20 depending upon your exact requirements, you can pick any of the following three methods:

Method # 1: Finding all the Symbolic Links of the Current File System:

If you want to list down all the symbolic links of your current file system in Linux Mint 20, then you can do this by executing the command shown below:

$ sudo find / -type l

How to get a list of Symbolic Links on Linux linux shell

This variation of the “find” command will take a reasonable time to execute since it has to traverse through your whole file system for finding all the symbolic links that it has. After its execution, you will be able to see a very long list of all the symbolic links within your current file system as shown in the following image:

How to get a list of Symbolic Links on Linux linux shell

Method # 2: Finding all the Symbolic Links of the Current Working Directory

Now, if you want to find all the symbolic links of your current working directory, then you can do this by executing the command shown below:

$ sudo find . -type l

How to get a list of Symbolic Links on Linux linux shell

This command will execute relatively quickly after which you will be able to see a list of all the symbolic links of your current working directory as shown in the following image:

How to get a list of Symbolic Links on Linux linux shell

Method # 3: Finding all the Symbolic Links of any Specific Directory

You can even list down all the symbolic links of any specific directory with the help of the command shown below:

$ sudo find DirectoryName -type l

You need to replace DirectoryName with the name of the directory whose symbolic links you want to find along with its complete path.

How to get a list of Symbolic Links on Linux linux shell Advertisement

This command will also execute readily after which you will be able to see a list of all the symbolic links of your specified directory as shown in the following image:

How to get a list of Symbolic Links on Linux linux shell

Conclusion

Depending upon your usage requirements, you can pick any of the three methods discussed in this article for listing down all the symbolic links of your system. All of these methods are based on one-liner commands, therefore, you will be able to perform them very quickly.