Which of the following commands is used to change the working directory? A. cd B. changedir C. chdir D. cdir E. None of the above

[amp_mcq option1=”cd” option2=”changedir” option3=”chdir” option4=”cdir E. None of the above” correct=”option1″]

The correct answer is A. cd.

cd is a command-line utility for changing the current working directory. It is available on most Unix-like operating systems, including Linux, macOS, and *BSD.

The syntax for the cd command is as follows:

cd [directory]

If no directory is specified, cd changes to the user’s home directory.

For example, to change to the directory /home/user, you would type the following command:

cd /home/user

To change back to the previous directory, you can use the .. (dot dot) notation:

cd ..

You can also use the cd command to change to a directory that is relative to the current directory. For example, to change to the directory ../Documents, you would type the following command:

cd ../Documents

The cd command is a very useful tool for navigating the file system. It is also a very common command, so it is important to know how to use it.

The other options are incorrect because they are not valid commands.

Exit mobile version