Symbolic links on Windows and Linux in a simple and fast way

I symbolic links they are special connections, simple to make but that often not everyone knows and that can be useful on various occasions, let's see in detail what it is.

symbolic links

Unlike a normal link, i symbolic links they do not contain data from the target file but only references to other elements of the file system, I bet that after such a definition your desire to try your hand at creating symbolic links is less than zero, but let me give you some practical examples.

What are symbolic links?

Think of a normal connection: it is nothing more than a shortcut pointing to another file located somewhere in which file system folder and which you can for example put in the desktop for convenience (a link to the .exe file of the antivirus, or rather to the your photo folder located in C: / Users / MyUser / Documents / Photos).

Now let's say that instead of a trivial link to that folder you want to view the contents of your "C: / Users / MyUser / Documents / Photos" folder in a folder called Images on Windows (or Linux the concept is the same), that is to open the Pictures folder and find yourself inside all your photos (contained in the folder C: / Users / MynameUuser / Documents / Photos) this is what the symbolic links, not bad eh?

After this example we will probably have a little clearer ideas about the difference between normal and symbolic links, which instead of simply pointing to an element, allows you to show the content of another element within an element of the file system.

Create symbolic links on Windows

Let's see how make symbolic links on Windows, we specify that the procedure is very simple both on the operating system of Microsoft and on Linux.

On Windows (any version) we can use the mklink command from the CMD prompt, to do so:

  • Open the Windows CMD (preferably in administrator mode) by selecting from the Start menu with the DX key -> run as administrator.
  • type the following command:
mklink C: / Users / MyUserUser / Documents / Photos C: / Images

in this way we have realized the symbolic link of which we have spoken in the previous example, obviously you will be able to replace the source and destination paths to your liking.

It is possible too create symbolic links on single files and not only on folders, in short, get junk.

Create symbolic links on Linux

to create symbolic links on Linux the process is very similar to Windows:

  • Open the terminal and type:
ln -s original_path_file_or_folder link_simbolic_destination

That's all, let me know in the comments if you encounter difficulties.

Receive the latest posts by email

Enter the email and choose the inscriptions on the new page

tags:

InTheBit.it
Added devices
  • Compare Smartphone (0)
  • Compare Notebook (0)
Compare