Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Symlink a file in Linux?

I want to make a symbolic link in Linux. I have written this Bash command where the first path is the folder I want link into and the second path is the compiled source.

ln -s '+basebuild+'/IpDome-kernel/kernel /home/build/sandbox/gen2/basebuild/IpDome-kernel/kernal

Is this the correct way ?
by

2 Answers

Kajalsi45d
To make another symlink (will fizzle if symlink exists as of now):
ln -s /path/to/file /path/to/symlink

To make or improve a symlink:
ln -sf /path/to/file /path/to/symlink
sandhya6gczb
To create a symbolic link /soft link, use:

ln -s {source-filename} {symbolic-filename}

where ln is link command and -s flag specifies a soft command.

For example

ln -s file1 link1

Login / Signup to Answer the Question.