0

I'm learning how to use linux on immersive labs and I've never coded before. Could someone please help me with this question I've been stuck on for a while now. It's related to file permissions in Linux - specifically symbolic linked files. Also, whats the best way to understand, get used to and learn how to navigate linux. Thanks, M. enter image description here

1

1 Answer 1

0

Short answer: /etc/passwd

Long answer: to find the name of the actual file/folder that a symbolic link points to, check the info after the -> in the ls -l command. The link passwd in your example is a relative link. The ../.. means that the file/directory is (2) levels above where you're starting from. A link like this is created with the command:

ln -s ../../etc/passwd .

Now, relative links work great, unless they are moved to a different directory level; try moving passwd to .config and the link will be broken. If the link had been created like this:

ln -s /etc/passwd .

then your link would look like this (with ls):

passwd -> /etc/passwd

and it would not matter where the link was moved to.

1
  • Thanks so much, you've solved my problem! I've just started using Linux and I never thought I'd get a reply so quickly.
    – user380506
    Nov 5, 2019 at 18:44

Not the answer you're looking for? Browse other questions tagged .