Wednesday, February 12, 2014

How to make a shortcut in Linux shell?

Making shortcuts in Linux command line is rather easy. Nevertheless, it is a somewhat more tricky than making shortcuts in Windows, as we are not provided with the GUI (Context menu).

You should use ln -s command to make a Linux shortuct using command line. The -s parameter is necessary in order to create a symbolic link (shortcut), instead a hard link (reference).

The basic syntax is here:
ln-s source target

Where:

source - absolute path to the original file
target - absolute path to the shortcut which is to be created

An example of creating Eclipse shortcut on user ubuntu's desktop:

ln -s /home/ubuntu/kepler/eclipse /home/ubuntu/Desktop/eclipse

Using absolute paths is highly recommended, as relative paths can easily lead to confusion if the target and source are not in the same directory.

One more thing, if you are making a symbolic link to an executable, make sure it has a permission to be executed as an executable.

PSR-1 and PSR-2 coding standards for PHP

Visual aspects of code play a significant role in raising or drowning developer's productivity. In case that there's too much clutte...