An ad-free and cookie-free website.
Learn to make file or directory links at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux ln Command Summary with Examples (3:57)
Our twenty-first word, or command to memorize is
ln from the category
ln allows you to make file or
||Print help screen|
||Set up a symbolic link instead of a hard link|
Recall from the last video (tutorial) we saw a connection between the
pico and here we'll sort that out.
Before we start, it helps to think about commands as mini programs and
most follow this structure:
command -option(s) argument(s).
ln command has
16 options and there are typically two arguments,
the target file and the link name,
which is the pointer.
Like most commands, help is available, here with double-dash
Because the concept of links can be difficult, for now I'd just like to
draw your attention to the
for symbolic links.
So why is
ln an important command?
ln is widely used on your
system already, and you will need to establish links.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go, using the
from video 19, let's
"make up words",
create a file
>, and put it in the
directory one above here
So to avoid typing that and wasting time, let's make a symbolic link,
ln -s, the
the link name
There it is, in a different color (bold here), and use
cat from video 10 to view (the
And last, let's revisit the
topic from earlier. Let's do a
on the commands.
Basically, behind the scenes is a (symbolic) link pointing
pico to open
nano and this is where my system
Again, links are very common, so we'll revisit the topic again later.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
The two link types: symbolic (soft) and hard, are worth knowing, so
please read the help file.
Okay, great, thanks for visiting today. I hope this was a fun
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Reach out to us with questions and comments at YouTube. Subscribe and follow @twitter for new content announcements.
nanocommand, hit Back.
mkdir, click Next.
A newly-updated free resource. Connect and refer a friend today.