There's a curious feature missing from the GNOME desktop that ubuntu relies upon: quick and easy shortcut creation. For example, suppose you want to create a desktop shortcut to your Documents folder. You can right-click it and select Make Link, but this won't work with all folders because the new link is created within the parent folder, and you might not have permissions to write there (this can be an issue when creating links to system programs in the /usr/bin folder, for example). You can create a desktop launcher that redirects to the folder or file, but this is annoyingly long-winded and involves working your way through a dialog box.
A solution to this problem is built-into GNOME. It's just hidden. Simply middle-click the folder or file and drag it to where you want the shortcut to be, and then select Link Here from the menu that appears when you release the mouse-button. This will create a new link to the folder or file. On most modern mice, the middle mouse button is the scroll-wheel, which doubles as a third mouse button.
The type of link created is a symbolic link, which isn't just a GNOME desktop shortcut. It will also work at the command-line too.36
To create a symbolic link at the command-line, type ln -s, specifying the original file and then the new link name (including paths, if necessary). For example, the following will create a link to the Gedit text editor (which lives in the /usr/bin folder) on the desktop, and call it Text Editor; this command assumes you're currently browsing your /home folder: $ In -s /usr/bin/gedit "Desktop/Text Editor"
36. There are two types of links offered by the Ubuntu file system—symbolic links, and hard links. Symbolic links are like shortcuts created within Windows—they're very small files that "point" towards another file (or folder). However, the link file exists at file-system level, unlike those in Windows, which are actual files. In contrast, a hard link is a little like copying the file, except the actual data isn't copied. Instead an additional "pointer" is made for the file. In other words, two (or more) files share the same block of file data. Hard links introduce some complexity into proceedings and have a very specific use, so in most cases it's best to stick with symbolic links.
Following this the link will act just like the original file—double-clicking it will start Gedit. It's worth pointing out for the nervously inclined that deleting the shortcut won't delete the original file.
Was this article helpful?