105k views
1 vote
If a user’s current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root?

1. cd
2. cd /home/mary/etc
3. cd etc
4. cd /etc
5. cd \etc

User Earl Zedd
by
3.8k points

1 Answer

2 votes

Answer:

Option 4 is the correct answer to the above question.

Step-by-step explanation:

In the Linux operating system, The etc folder is listed on the root directory. When any user wants to go in the root directory of the Linux operating system from anywhere, then he needs to follow the command of the name of the folder where he wants to go with the '/' symbols. The above question states that the user wants to go to the etc folder of the root directory, then he needs to press the command '/etc' with the help of cd command because cd command is used to open any folder. So the option 4 is the correct, while the other is not because--

  • Option 1 states about cd which gives the error.
  • Option 2 states about cd /home/mary/etc which take the user to the etc folder which is in the mary folder.
  • Option 3 states about the cd etc which is used to take the user on the etc folder which is in the current folder.
  • Option 5 states about the cd\etc which gives the error.
User Fiid
by
4.5k points