

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 10
click for more info
Not enough gems
Cost: 6 gems
1: Open a Terminal
incomplete
2: Installing Windows Subsystem for Linux
incomplete
3: Terminal Alternatives
incomplete
4: Download Worldbanc
incomplete
5: Shell Configuration
incomplete
6: PATH Config
incomplete
7: Shell Aliases
incomplete
8: Man
incomplete
9: Symbolic Links
incomplete
10: Top
incomplete
11: Interrupt
incomplete
12: Kill
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
A symbolic link, usually called a symlink for short, is a special kind of file that points to another file or directory.
It's a lot like a shortcut in a GUI. The symlink has its own path, but when you use it, the operating system follows the link to the target.
The ln command creates links. To create a symbolic link, use the -s flag:
ln -s target_path link_path
Note, the path to the target comes first, then the path where the symlink will be created. For example:
ln -s documents/important.txt important.txt
That creates a symlink in the current directory named important.txt, which points to documents/important.txt.
A relative target is resolved from the symlink's location, not from wherever you run ln.
You can use either a relative or an absolute path for the target. Both options have tradeoffs!
If you use an absolute path, you can usually move the symlink without a problem, but moving the target will break the symlink. If you use a relative path, the symlink will continue to work as long as its position relative to the target stays the same. For example, you could move a parent directory containing both the symlink and the target.
A symlink is not the same as a copy: it doesn't duplicate the file's contents. It just creates another path that points to the original. That means:
You can use ls -l to see where a symlink points:
important.txt -> documents/important.txt
WorldBanc's T-Bills product is filed under credit_cards, but Treasury Bills are an investment, not a credit card. You'll move the file where it belongs, then leave a symlink at the old path so any old documentation that still points to credit_cards/tbills.txt keeps working, without keeping a second copy of the file.
credit_cards).credit_cards and investments are siblings, so the target needs to go up one level first (../investments/tbills.txt).Paste the ls -l output and submit it.