How to Display Files in the Root Directory of a Hard Drive

by John Wu

The root directory of a hard drive is the top most directory in a hard drive. Each hard drive has its own root directory. All other directories or folders on the hard drive lie below the root directory. In the Windows and Unix operating systems, it is easy to display the files in the root directory of a hard drive. Even for those who prefer to use the command line, the process is still very simple.

Step 1

To see the root directory on a Windows system via the GUI, click on Start and then click on My Computer. The window will display all known hard drives on the Windows system. Click on any of the drives to display the files in the root directory for that hard drive. Click the back button and then another drive to see a different hard drive's root directory. In a Linux or Unix system with a GUI, you can do something very similar to the Windows example above using the file browsing program that is available on your Linux or Unix system. The file browsing program you use varies from operating system to operating system.

Step 2

If you want to see the root directory from the command line on a Windows system, click on Start and then look for the Command Line program in the Programs folder. Once you've found the Command Line program, run it. On a Linux or Unix system, look for an icon that looks like a computer terminal on the desktop. Click on the computer terminal icon to bring up a command line window.

Step 3

In the Windows command line, type "cd c:\" where C is the drive letter of the hard drive. The "cd" command in Windows, Unix, and Linux stands for change directory. This command changes your command line location to the C hard drive's root directory. In Unix and Linux, type "cd \" to change your command line to the root directory for the boot drive. To get the root directories other hard drives, run the "df" command to get a listing of mounted filesystems and use the "cd" command to get to them. For example, if another drive is mounted as /export, the "cd" command you run is "cd /export."

List the files in the directory. In the Windows command line, type "dir." In Unix and Linux, type "ls" instead. In both cases, these commands list the files in the current directory, which should be the root directory of the hard drive.


Photo Credits

  • plex

About the Author

John Wu is a writer who has covered computers, health, fitness and business since 2008 for various online publications. He is also an IT manager at a government agency. Wu holds a B.A. in legal studies from University of California, Berkeley and a B.S. in computer science from San Jose State University.

More Articles