Directories

In the shell, understanding what the home, working, and parent directories is crucial for effective navigation and file management. Let's break down each section:

Home directory

The home directory is a specific directory assigned to each user on a system. It’s the default directory where a user lands when opening a terminal session.

It serves as a personal space for the user, containing personal files, configurations, documents, and other user-specific data. On Unix-like systems, it’s typically located at /home/username (where username is the name of the system’s user).

Working (current) directory

The working directory, also known as the current directory, is the directory in which the user is currently operating in the terminal. It’s the default location for executing commands, creating, or accessing files without specifying a full path (we will explore this concept more in the next lesson).

Parent directory

The parent directory is the directory immediately above the current working directory in the hierarchy.

File systems are structured in a hierarchy, where directories can contain subdirectories and files. For example, if your current directory is /home/username/Documents, the parent directory is /home/username.

Quiz Question

Match the following terms to the correct definition:

Terms
  • Home Directory
  • Working Directory
  • Parent Directory