How to create folder shortcut in Ubuntu 14.04?
Solution 1
Click on that folder, click on make link, then move the shortcut to Desktop.
Solution 2
it simple: just press Ctrl + Shift and drag.
Solution 3
You can read full details here
man ln
ln -s /usr/bin/bar /opt/foo
also see this link Create a soft or symbolic link
Solution 4
I wasn't able to file a reliable solution from the other provided answers. As such, I'm sharing my preferred approach to creating a desktop shortcut.
Desktop shortcuts can be added by creating a file with the .desktop extension in the ~/Desktop/
folder using any text editor. The .desktop file we create shall launch the folder viewer app xdg-open
at the location specified by [folder-path]
.
Though it's not necessary, it is of course sensible to name the file similarly to the folder name.
The following information should be written to ~/Desktop/[file-name].desktop
:
[Desktop Entry]
Name=[folder-name]
Exec=xdg-open [folder-path]
Type=Application
Terminal=false
Icon=[icon-path]
Replacing [folder-name]
with the name of the folder and [folder-path]
with the location of the folder.
Please Note: If the location or name of the folder changes then the .desktop entry will require to be edited.
Once the file has been created it shall appear on the desktop. Right click it and click Allow Launching
to activate the .desktop file as an application.
You can replace [icon-path]
with an image of your choice; Default Ubuntu icons are located at: /usr/share/icons/
.
Examples of default Ubuntu folder icons include (but are not limited to):
/usr/share/icons/Yaru/48x48/places/folder.png
/usr/share/icons/Humanity/places/48/folder.svg
/usr/share/icons/HighContrast/48x48/folder.png
For more information on the Desktop Entry Specification please see: https://developer.gnome.org/desktop-entry-spec/
Note that as our file is launching xdg-open
it is proper to use the .desktop extension, rather than the .directory extension.
Solution 5
Apparently this is handled correctly from the GUI :-) (14.04 LTS)
(Move to Trash, Empty Trash)
But generally: When you have a link to a directory, be VERY sure to delete ONLY the link should/when you come to that point.
From terminal, the correct thing to do is:
rm LINK-TO-DIR
BUT NOT:
rm -r LINK-TO-DIR
... which will first delete the files/dirs that the link MAKES VISIBLE,
and even more so with the "-f" flag.
If you are a "Terminal" user, have a look on the output of
ln --help
... that ls lover case of LN nothing else ;-)
The syntax for it may seem a tad "backwards" at first as you FIRST specify where it should point, then the name of your LINK.
cd $HOME/Desktop mkdir -p $HOME/z ln -s $HOME/z New-Link-To-Home-z
... note that the GUI will not notice the new Desktop content without help; you need to logout+login.
More info on the 'net or slightly terse in either of
man ln info ln
... where I personally prefer the first because 'info' has a tendency to 'slip out of context'.
Related videos on Youtube
Jim Blum
Updated on September 18, 2022Comments
-
Jim Blum over 1 year
I have a folder in my Dropbox and I want to add a shortcut of that folder on my Desktop. I guess this should be extremely easy as in Windows OS :) However, I have no idea how to do it in Ubuntu 14.04.
Is there anything I can do to create a simple folder shortcut on my desktop?
-
sohel4r almost 10 yearsYou have two option to create shortcut. First right click on folder and hit make link .You can use terminal sudo ln -s (folder path) (where you want to create shortcut)
-
Jim Blum almost 10 yearsthanks a lot @sohel4r. I'll probably use the "make link" option
-
muru almost 10 years@sohel4r Why use
sudo
for a simple link? Also, another option would be to press Ctrl+Shift and drag the folder to the Desktop. -
sohel4r almost 10 years@muru Well You install apache then you want to link www folder .So What will you use .Think you want to make a link but you have't global permission of that folder .how will you make a link.I am know very poor in Linux.If i am wrong then teach me .
-
muru almost 10 years@sohel4r Well, he's not making a link in a root-owned folder, but to his own Desktop. Use sudo when you absolutely have to, not when you feel like it. As a sysadmin, I frequently get emails about users who try to use
sudo
when it is absolutely unnecessary, like the case you made just now. The right way to go about accessing folders of servers (like/var/www/
is to add yourself to the server's group (www-data
, in this case), and make the folder group-writable.
-
-
diEcho over 9 yearsBut when we click on that folder from desktop, there is no UP folder,back < takes to
home/desktop/
folder -
HelpNeeder over 9 yearsSome of files, to which you don't have root privileges, won't work.
-
David Foerster over 8 yearsA little short, but definitely an answer imho.
-
klequis almost 8 yearsThis worked for me in two cases 1) creating a link to a separate internal hard drive (not the system disk) where Make Link was grayed-out, 2) For a directory on NAS storage where the Make Link gave an error, "This target doesn't support symbolic links".
-
Alexey Ce over 7 yearsThis is the answer. The other answers either resort to CLI or don't work. A short answer is fine.
-
co9olguy about 7 yearsCtrl+Shift+Legendary
-
jave.web over 6 yearsThis is handy, because I don't have an option in the right click context menu on folder - however is there a way how to add it to the context menu ?
-
Abhimanyu Pallavi Sudhir almost 6 years@jave.web Yes -- use the application menu (either at the top left of your screen or a colourful icon next to the window controls) to go to your Nautilus preferences, then under "Behavior" enable link creation.
-
jave.web almost 6 yearsI'm using pcmanfm, but even if I run nautilus I see no such option :/ After editing Behavior preferences, I do see new context menu option "create link", however created link acts as alternative path - it does not open linked path, it creates something like a mounted folder.
-
Accountant م over 5 yearsWorks also on "Linux Fedora 28"
-
Philip Rego over 4 yearsThis doesnt work in Ubuntu 18
-
Philip Rego over 4 yearsThere's no make link option in Ubuntu 18
-
Philip Rego over 4 yearsThat's wrong. That's only for files. You give no explanation and link to a different question. And why would you create a shortcut with a different name than the folder.
-
jave.web over 3 years@PhilipRego I must disagree, works on Ubuntu 18 - both nautilus and nemo ...
-
Philip Rego over 3 years@jave.web Doesn't work on the Desktop. That's probably what I was trying.
-
jave.web over 3 years@PhilipRego well that's what I mean, it works for me on Desktop just fine - well creating the link there - do you mean within the Desktop itself?
-
Marcelo Scofano Diniz almost 3 yearsFor Ubuntu 20.04 it works flawless. I used it to create a link in Desktop of an regular User; this link points to a NAS drive folder. It displays the Folder, Name and the North-East purple arrow, in my regular Ubuntu theme. Of course I had to set permissions first.
-
Satish Chandra Gupta almost 3 yearsBest way to create folder shortcut, no hectic of another dependency
-
suhailvs over 2 yearsthanks. this let me create a shortcut of a folder on linux.
-
matigo over 2 yearsThis is the same as solhel4r’s answer from several years ago 🤔
-
Admin almost 2 yearsDid not work on Desktop. Further, the link created this way does not take you to the folder. The solution provided @tseabrook is a good solution.
-
Admin almost 2 yearsI think this is what most people will need. Solved my problem. Thanks.