Changing Into a Directory
00:00 There was no output, right? So, I don’t know, it’s maybe, it’s interesting to know that you don’t get an output when you create a directory, right? Like, it doesn’t tell you anything there. But I can list—I’m skipping ahead here, am I?—I could just move into that directory.
What do you think about that? Let’s move into this directory. Okay. Let’s first—this might be an interesting part—so if you would
cd, the change directory command, into and now try to use a name that doesn’t exist—like, for example, with the quotes at
pb terminal. Okay.
Because I want to see, like, if the terminal is just, like, ignoring stuff or giving you an error. Okay, cool. There we see the output that
no such file or directory as
pb terminal exists. So, okay, so if you’re changing into the one with the underscore now and it works, then—So,
cd is for change directory, and that means essentially clicking, like, you want to go into a folder. Yeah.
pb_terminal/ and then here I am. Cool.
After I moved into the
pb_terminal/ folder, you now see that here in blue it says
pb_terminal, and that’s a default I think on the Z shell, which is the default shell that you get on macOS.
And before, you also had this blue thing, but it was a
~ symbol, and it’s still the symbol also tells you where you are actually because it’s a placeholder for your home directory.
~ stands for
/User/ and then your username. And now, since I moved into a different folder, it now gives me the name of the folder that I’m in. Okay, cool.
So, maybe you can use the
pwd command again to show the path where you are in right now. Sure. So, I type again
pwd (print working directory), and now you can see that we moved from
/Users/martin/, my home directory, into
pb_terminal/, which is a subfolder of my home directory.
Become a Member to join the conversation.