Which command would you use to print the current working directory?

Study for the Linux Fundamentals Test. Enhance your skills with flashcards and multiple-choice questions. Each question has hints and explanations. Get ready for your exam!

To print the current working directory in a Linux environment, the command that you would use is "pwd". This stands for "print working directory" and, when executed, it displays the full path of the directory that you are currently in. For instance, if you are in a directory called "/home/user/docs", running the "pwd" command will output that exact path.

The alternative commands listed serve different purposes: "ls" is used to list the contents of a directory, "whoami" displays the current user's username, and "cd" (change directory) is utilized for navigating between directories. Understanding the specific functions of these commands is essential for effective navigation and file management in Linux.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy