Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

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.

00:14 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.

00:31 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.

00:59 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.

01:14 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.

01:23 So, this ~ 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.

01:34 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.