symlink linux code example

Example 1: create a symlink

ln -s [/path/to/file] [/path/to/symlink]

Example 2: create symlink

ln -s source_file myfile

Example 3: linux symlink directory example

ln -s /mnt/external-drive ~/mydrive

Example 4: create symbolic link linux

$ ln -s file1 link1
#Example: ln -s /var/file_i_want_to_link /etc/symbolic_link_name

Example 5: remove a link linux

unlink symlink_name

Example 6: linux symbolic link

ln -s <file/folder to be linked> <path of the link to be created>
ln -s /home/james/transactions.txt trans.txt