Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Create Shortcuts in Linux – Symbolic Links

November 4, 2022
in Blog, Linux
0
ADVERTISEMENT

Table of Contents

Windows users are used to being able to create shortcuts to have fast access to their files and folders easily. This is especially useful when these are buried deep in their filesystem. This feature isn’t as obvious on most Linux systems as it is on Windows.

In this post, I’ll show you how to create a shortcut on a Unix-like operating system using a symlink.

Create Symlink in Linux

Terminal way (the link will appear in the folder the terminal points to):

ln -s <target file or folder> <link name - which can be a file or folder>

Example: I’ll create a shortcut to link the phpMyAdmin folder /usr/share/phpmyadmin to the root of the website folder /var/www/bonguides.me.

sudo ln -s /usr/share/phpmyadmin /var/www/bonguides.me

Check the link was created using ls command:

# ls -l /var/www/bonguides.me
-rw-r--r--.  1 nginx nginx   405 Feb  6  2020 index.php
-rw-r--r--.  1 nginx nginx 19915 Dec 31  2021 license.txt
lrwxrwxrwx   1 root  root     21 Nov  3 22:47 phpmyadmin -> /usr/share/phpmyadmin
-rw-r--r--.  1 nginx nginx  7389 Sep 16 18:27 readme.html
-rw-r--r--.  1 nginx nginx  7205 Sep 16 19:13 wp-activate.php
drwxr-xr-x.  9 nginx nginx  4096 Nov  1 20:06 wp-admin
-rw-r--r--.  1 nginx nginx   351 Feb  6  2020 wp-blog-header.php

Create Symlink in Linux using SCP

If you’re using a SCP tool like WinSCP, FileZilla…You can create a shortcut using GUI.

Note Note: In this post, I use WinSCP to connect to a Linux server.

1. Navigate to the destination directory and right click on the blank area then create a new Link.

Bg2380

2. Enter the link’s name and the destination file/folder that the link will be point to:

Bg2383

3. The shortcut/symlink was created in the destination directory, in my cases it’s created in /var/www/bonguides.me.

Bg2384

Finally, if you click on the symlink, it’ll redirect you to the source directory. In my case, it redirects you to /usr/share/phpmyadmin.

Bg2385

Remove Symbolic Links

To delete a symlink, invoke the rm command followed by the symbolic link name as an argument. On success, the command exits with zero and displays no output.

rm symlink_name
If the symbolic link points to a directory, do not append the trailing slash at the end. Otherwise, you will get an error:
Note Note: If the name of the argument ends with /, the rm command assumes that the file is a directory. The error happens because, when used without the -d or -r option, rm cannot delete directories.
rm: cannot remove 'symlink_to_dir/': Is a directory
# rm /var/www/bonguides.me/phpmyadmin
rm: remove symbolic link ‘/var/www/bonguides.me/phpmyadmin’?
ADVERTISEMENT
5/5 - (1 vote)
Previous Post

How to Install phpMyAdmin on CentOS 7 with Nginx

Next Post

How to Get the Windows 11 22H2 Update on Your PC/Laptop

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory