Introduction
A shell variable disappears when its shell ends unless future shells are told how to recreate it. The preceding guided lab used .zshrc for this purpose.
This challenge asks you to persist one variable only, then observe it from a fresh Zsh session.
Persist the Project Directory
Current Situation
PROJECT_DIR is not configured in /home/labex/.zshrc. A fresh Zsh session therefore does not know the project path.
Scope
- Configure
PROJECT_DIRin/home/labex/.zshrc. - Its value must be
/home/labex/project. - Reload
.zshrcin the current shell withsource. - Save the reloaded value in
/home/labex/project/project-variable.txt.
Your Goal
Persist PROJECT_DIR in .zshrc and make its value available after reloading that file.
Acceptance Criteria
- Reloading
.zshrcexportsPROJECT_DIRwith the value/home/labex/project. - After reloading
.zshrc,project-variable.txtcontains/home/labex/project.
Hints
Where did the guided lab place persistent exports?
It appended an export line to $HOME/.zshrc, then used source to reload the file in the current shell.
Summary
You persisted one exported variable in .zshrc, reloaded the file, and confirmed the resulting value.



