PythonIntermediate PythonNumPySQLGen AI
HTMLCSSJavaScriptIntermediate JavaScriptReactp5.jsNode.js
Command LineGit & GitHub
C++JavaData Structures & Algorithms

Exercise

02. |

Directories

Essentially, your computer is a filesystem made of folders and files:

Filesystem diagram

In the context of the command line, we refer to folders as directories.

Inside any given directory could be the following:

  • More directories (also known as subdirectories).
  • Files that have content inside (text, image, or video files).

The filesystem of your computer can be intimidating at first, and it's easy to get lost.

The working directory is wherever you are currently at within the filesystem.

We can show this with the pwd command, which stands for "print working directory".

$ pwd
/Users/dwight-schrute

This means that the working directory we are currently on is /Users/dwight-schrute, a dwight-schrute folder inside the Users folder.

Instructions

Let's go ahead and see what the default working directory is in our filesystem! 🗂️

After opening the command line, print the current working directory using pwd.

What is your current working directory? Type pwd and press enter to find out!

Help

Get a Hint

Want the solution? Try completing the lesson first!

New Item Unlocked!

pom pom characters gifitem duck

Rubber Duck NEW

Rubber duck debugging is a classic technique used by developers to debug code. By explaining the code line-by-line to a rubber duck, you can break down the code into smaller pieces, and potentially identify the error.

... It's silly, we know.

New Item Unlocked!

pom pom characters gifitem duck

Codédex BotNEW

I’m a coding mentor bot built with GPT-4 👋. I’m here to answer any questions related to programming, Codédex, and much more.

FEATURE UNLOCKED!

sad characters gif

You have 100 XP! This means you can now join our Discord community to chat and hang out with fellow learners and the team behind Codédex!
See you there. 😊

FEATURE UNLOCKED!

pom pom characters gif

You have 250 XP! This means you can now join our On-Platform community to chat and hang out with fellow learners!
Say hi in the Introductions channel. 😊

Navigation

01. Beginning...

02. Filesystem

03. Moving Day

04. House Tour

05. Clean Slate

06. Scavenger Hunt

Manipulation

02. Filesystem

10 XP