Running Ubuntu 18.04 and want to siphon my desktop files to my other drive with the use of symbolic links, but the command:

sudo ln -s media/ragnvaldr/Desktop home/ragnvaldr

won't work because home/ragnvaldr/Desktop already exists. Are there any ways to get around this? I.E. make a already existing directory into a symlink? Or possibly deleting the desktop temporarily, then running the command without screwing anything up?


You could simply name the link something else, e.g. sudo ln -s /media/ragnvaldr/Desktop /home/ragnvaldr/new-directory. If it's important that the link is called Desktop, then yes you do need to get whatever files you want to keep out of harms way out of Desktop and then delete the directory.

| improve this answer | |

You need to not be in a GUI session - the "desktop" view is browsing a folder, and so it would be kinda bad if it were deleted while you have a desktop session going.

Check my answer on this super-similar question for details - Ubuntu 18.04: Issue changing the default directories

In short, get to a console only VT after you've logged out of your desktop session. At that point, you can rename/move your current ~/Desktop and replace it with a symlink. I prefer to go to the destination directory (/home/username) and link it in with ln /path/to/real/location/Desktop .

| improve this answer | |
  • That is my other question I asked... Hence the similarity. I just didn't think it would work with in the case of the desktop. Honestly, your answer helped my so far, but it was a little advanced. I was hoping someone would xplain this specific case in laymans terms. – ragnvaldr.js Aug 10 '19 at 4:15
  • But i was just being an idiot anyway, because I didn't think about just renaming my desktop. – ragnvaldr.js Aug 10 '19 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.