Skip to content

Heading home#

Now let's head back to our home directory, which is where we began this journey. It's also a place that we own, privately, as a user.

Check this out:

1
2
3
michael@develop:/$ cd ~
michael@develop:~$ pwd
/home/michael

You should be able to tell that I've executed two commands here: cd and then the familiar pwd.

The cd command means "change directory" and we used it earlier too to visit / on the filesystem. Now we've used it to visit ~, which means tilde and represents our home directory.

Let's look at what we own: ls -lh

1
2
michael@develop:~$ ls -lh
total 0

That's depressing. I think this might be Linux's way of saying we have no friends! Well we can solve that easy enough: mkdir friends. Now we have a directory called friends:

1
2
3
michael@develop:~$ ls -lh
total 4.0K
drwxrwxr-x 2 michael michael 4.0K Mar 18 09:18 friends

We can see that d at the beginning means directory. We can also see the directory is owned by michael and the group michael too. Essentially that means only I own the file. And we just used a new command: mkdir. It means make directory and you're going to use man mkdir to find out more.

Let's visit our "friends":

1
2
michael@develop:~/friends$ ls -lh
total 0

Well this simply sucks. I guess we created a place (a directory) for our friends to gather but we never actually created any actual friends.