tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tips And Tricks > Linux > How to create symbolic link for a Directory

How to create symbolic link for a Directory

Author: Venkata Sudhakar

The below example shows how to create a symbolic link for a Directory using ln command with -s flag

ln - make links between files
   
 -s, --symbolic
     make symbolic links instead of hard links
Here we created a symbolic link /opt/tomcat/ for the folder /home/ec2-user/SOFT/apache-tomcat-9.0.37.
[root@ip-172-36-36-136 opt]# ln  -s /home/ec2-user/SOFT/apache-tomcat-9.0.37 /opt/tomcat
[root@ip-172-36-36-136 opt]# ls
aws  rh  tomcat

[root@ip-172-36-36-136 opt]# ls /opt/tomcat/
bin  BUILDING.txt  conf  CONTRIBUTING.md  lib  LICENSE  logs  NOTICE  
README.md  RELEASE-NOTES  RUNNING.txt  temp  webapps  work

 
  


  
bl  br