Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When creating a shortcut in windows it makes a .lnk file.

I have researched and it seems these are openable in linux(with some tweaking). Does Linux have an equivalent? If so, whats the extension?

share|improve this question
add comment

2 Answers

up vote 15 down vote accepted

Linux doesn't work with file extensions. However, you can make a shortcut on Linux using "symbolic links". They are something like a "pointer" to a file.

Take a look at here to see how to do it:

How do I create a symbolic link?

ln -s [TARGET DIRECTORY OR FILE] ./[SHORTCUT]

For example:

ln -s /usr/local/apache/logs ./logs
share|improve this answer
2  
However, unlike a Windows shortcut, a symbolic link will break when the target file is moved... which is pretty much the principal reason you'd use a shortcut. So strictly speaking a linux symlink is not the equivalent of a Windows shortcut, it's the equivalent of a Windows symlink. –  Factor Mystic Jul 14 '11 at 19:45
2  
Symlinks are my favorite tool for keeping my files organized. Linux symlinks are kept in sync with the target file no matter what program reads them! –  Nathan Moos Jul 15 '11 at 0:09
add comment

Linux has two types of links:

  • .desktop files: created by graphical file managers. They are similar to Windows .lnk shortcuts, minus the automatic updating. They, like shortcuts, only work inside the GUI file manager program.

  • Symbolic links: created with ln -s target link on Linux and mklink link target on Windows. These can be used transparently by any program.

share|improve this answer
3  
Oh, the superiority of Posix-based systems! –  Roy Tinker Jul 14 '11 at 17:18
    
@Roy: There's always Plan9. –  grawity Jul 14 '11 at 17:49
    
That looks interesting, @grawity. I'll check it out. Thanks! –  Roy Tinker Jul 14 '11 at 17:57
3  
there is the third one, hard link –  Lie Ryan Jul 14 '11 at 18:41
    
@Lie: Yes, but it's not very widely used as a .lnk alternative due to the limitations. –  grawity Jul 14 '11 at 19:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.