Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page




Reference number: CH000795

How do I change directories?

Question:

How do I change directories?

Answer:

Below is additional information about how to change a directory or folder while working on a computer. Click on the below operating system you're looking for information on how to change directories or folders.

Microsoft Windows
MS-DOS
Linux / Unix

Microsoft Windows

To change folders while in Microsoft Windows, open either My Computer or Windows Explorer and double-click the folder you wish to move into.

Microsoft Windows users can also change directories at the MS-DOS command prompt (command prompt) as explained below. Information about how to get into the command prompt from within Windows can be found on document CHDOS.

MS-DOS

To change directories while in MS-DOS, use the cd command. Below are some basic examples of how this command can be used to change directories.

Before changing directories, you need to know what directories are available in the current directory. To do this, use the MS-DOS dir command. For example, type the below command to only list directories in the current directory.

dir /ad

See our dir command page for additional information and examples of this command. Once you know the directory is available, type a command similar to the below command. The below example changes into the windows directory.

cd windows

If you need to move into multiple directories with one command, you can use a command similar to the below example. In the below example, the command would move into the system directory, which is in the windows directory.

cd windows\system

Finally, if you need to move back a directory, you can use the below command.

cd..

If you were in the Windows directory when you typed this command, it would move you back to the C:\ directory.

See our cd command page for additional information and examples of this command.

Linux / Unix

To change directories while in a *nix environment, use the cd command. Below are some basic examples of how this command can be used to change directories.

Before changing directories, you need to know what directories are available in the current directory. To do this, use the ls command. For example, type the below command to only list directories in the current directory.

ls -d */

See our ls command page for additional information and examples of this command. Once you know the directory is available, type a command similar to the below command. The below example changes into the public_html directory.

cd public_html

If you need to move into multiple directories with one command, you can use a command similar to the below example. In the below example, the command would move into the cgi-bin directory, which is in the public_html directory.

cd public_html/cgi-bin

Finally, if you need to move back a directory, you can use the below command.

cd ..

If you were in the public_html directory when you typed this command, it would move you back into the home directory.

See our cd command for additional information and examples of this command.

Additional information:

 

 

 

 

 

Index


Category:
Linux / Unix Q&A
MS-DOS Q&A
Windows 95 Q&A
Windows 98 Q&A
Windows ME Q&A
Windows NT Q&A
Windows 2000 Q&A
Windows XP Q&A

Companies:
Various

Related Pages:
 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope