Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hey guys, how do you create a symlink in the command console? Thanks, Alex T...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    25

    How to create a symlink?


    Hey guys, how do you create a symlink in the command console?

    Thanks,

    Alex T

  2. #2
    Linux User IsaacKuo's Avatar
    Join Date
    Feb 2005
    Location
    Baton Rouge, LA, USA
    Posts
    383
    ln -s <destination> <linkname>

    If the desired link filename is the same as the destination's filename, and the current working directory is the desired location for the link, then you only need:

    ln -s <destination>
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    25
    Ok cool, does it matter that I'm trying to create a link to a directory?

    Thanks,

    Alex T

  4. #4
    Just Joined!
    Join Date
    Aug 2005
    Posts
    25
    Acutally let me show you:

    I've got a directory called /usr/local/diverse/installed. In this dir there is the sub-dir "dtk-2.3.2" I want to create a link in "/usr/local/diverse/installed" called "dtk" to "dtk-2.3.2."

    I'm not sure which directory I should be in. and what I should type.

    Thanks

  5. #5
    Linux User IsaacKuo's Avatar
    Join Date
    Feb 2005
    Location
    Baton Rouge, LA, USA
    Posts
    383
    cd /usr/local/diverse/installed
    ln -s dtk-2.3.2 dtk

    The syntax is the same whether the link is to a file or a directory.
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  6. #6
    Just Joined!
    Join Date
    Aug 2005
    Posts
    25
    ok great I see thanks a bunch.

  7. #7
    Just Joined!
    Join Date
    Aug 2005
    Posts
    2
    I am having the same sort of problem.

    Let me lay it out for you.

    I have a directory:
    home/ruby/personal/books/list

    Now I want to have a link to it in this directory
    home/ruby/personal/school/

    I want the name of the link to be book_list.

    Where should I run the command and what should it say?

    Thanks.

  8. #8
    Just Joined!
    Join Date
    Aug 2005
    Posts
    2
    I was able to figure it out.

  9. #9
    Linux User IsaacKuo's Avatar
    Join Date
    Feb 2005
    Location
    Baton Rouge, LA, USA
    Posts
    383
    One way to do it:

    cd /home/ruby/personal/school/
    ln -s /home/ruby/books/list book_list
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  10. #10
    Just Joined!
    Join Date
    Feb 2007
    Posts
    1

    To create symlink

    All of the above mentioned create hardlinks. They are slightly different. To create a symlink, use the command symlink, instead of ln.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •