Symlink not being created
I'm running Fedora on a laptop with a small SSD and large HDD. I've got the OS installed on the SSD and my data on the HDD.
All my files are located at /run/media/kennedy/data/Kennedy
What I had before (and want again) is a symlink from /home/kennedy
to that location. That way I'm not messing with actual /home
, but when I am in /home
as normal user, all my things are easily accessed and stored with plenty of space. Right now /home/kennedy
has the standard directories; desktop, documents, downloads, and so forth. No files worth worrying about.
So I opened a shell, logged in as su, and entered
ln -s /home/kennedy /run/media/kennedy/data/Kennedy
expecting that when I cd /home/kennedy
and ls
, I would see all my lovelies. Instead, I see that standard folders and nothing more. Whisky Tango Foxtrot, over.
edit to add: I'm pretty sure the permissions are right, but only pretty sure. How do I check and correct that (if off)?
You have to reverse the arguments:
ln -s /run/media/kennedy/data/Kennedy /home/kennedy
This will:
/home/kennedy
doesn't exist ( kennedy
would be the new symlink) /home/kennedy
exists and it is not a directory (symlink or a regular file); need add -f
flag in such a case - ls -sf ...
/home/kennedy
is a directory, then the symlink will be created as /home/kennedy/kennedy
See this related post: How to symlink a file in Linux?
You have the command backwards, it should be:
ln -s /run/media/kennedy/data/Kennedy kennedy
Invoke the command while you are in your /home
directory, then you should be set.
下一篇: 没有创建符号链接