Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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?


For example:

ln -s /usr/local/apache/logs ./logs
share|improve this answer
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
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
@FactorMystic If you make the symlink point to an absolute location in the filesystem, this is not the case. ln -s /usr/local/apache/logs ./logs will make a symlink to /usr/local/apache/logs, and will not be broken when you move it around. – djhaskin987 Jan 6 at 21:40

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
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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .