current working directory
The directory a shell or process is standing in, where any relative path or bare file name is looked up.
In more detail
Each process has its own, and a child process starts with a copy of its parent's, so a script that changes directory never moves your terminal. In a shell, pwd prints it and cd changes it.
Examples
In Python, Path.cwd() or os.getcwd() shows it; Idle and double-clicked scripts may start somewhere unexpected.auditd's CWD record stores the directory the command was run from.Related terms
- pwd — The command that prints the full path of the current working directory.
- cd — The builtin that changes the shell's current working directory.
- relative path — A file path given from the current directory, such as site/index.html, rather than from the root of the filesystem.
- child process — A process started by another process, its parent, from which it inherits a copy of the environment and current directory.
- auditd record — One line of the Linux audit log; several records with the same serial number make up one event.
Taught in
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- What Bash Does To A Line Before It Runs It — Bash Scripting & Command Line Automation
- The Unquoted Variable: Splitting And Globbing — Bash Scripting & Command Line Automation
- Command Substitution And Subshells — Bash Scripting & Command Line Automation
- Style That Prevents Bugs — Bash Scripting & Command Line Automation
- find And xargs — Bash Scripting & Command Line Automation
- Idle And The Python Shell — Hands-on Python: Complete Video Course & Book
- Files: Writing And Reading — Hands-on Python: Complete Video Course & Book
- Windows And Mac Specifics — Hands-on Python: Complete Video Course & Book
- Windows Event Logs, Sysmon & Linux Auditd Telemetry — Security Operations & Threat Hunting (SOC)