The correct answer is cd.
Thecd (change directory) command is used in many command-line interfaces (CLI) such as Unix, Linux, and Windows to change the current working directory. When you execute thecd command followed by a directory path, the shell or command prompt will switch to that directory. For
Example:
\[
\texttt{cd /home/user/documents}
\]
This command would change the working directory to the specified path.
Explanation of Other Options:
(B) dir:
Thedir command is used to list the contents of the current directory, not to change it. It is commonly used in command-line interfaces like DOS, Windows, or Linux to display files and directories in the current working directory.
(C) changed:
There is nochanged command in common shell environments (like Linux, Windows, or Unix) for changing the working directory. This is not a valid command.
Summary:
- cd is the correct command used to change the current working directory.
- dir lists the contents of the directory and does not change the directory.
- changed is not a valid command in any major shell environment.