Working with Links

Learn how to use links to make shortcuts in a filesystem.

We'll cover the following

Sometimes, it’s helpful to create a shortcut to a file. For example, we may want to keep a configuration file in an easy-to-access location, but a piece of software expects to find that file in a specific location. We can use links to create shortcuts to files.

Looking at inodes

When we create a file, we’re creating a link to an inodeinode. Let’s create a new file named greetings.txt that contains some text:

$ echo "Hi there!" > greetings.txt

Now, we use the ls -i command to look at the inode associated with the file:

$ ls -i greetings.txt

Get hands-on with 1400+ tech skills courses.