cd command is the equivalent of the Unix
pwd command. When the
cd command is used without specifying any parameters, it displays the current
drive and directory.
Click on the Search bar, type "cmd" and open the Command Prompt.
The cd command is used to display the name of the current directory or change the current directory.
cdcommand without providing any parameters, it displays the current drive and directory.
You can look at other examples of using the
cd command in
of the docs.
For example, the
cd\ command can be used to return to the root directory.
If you need to change to a directory that contains spaces in its name, enclose the path in double quotes.
cd "Documents and Settings"
To open CMD as an administrator:
Click on the Search bar and type CMD.
Right-click on the Command Prompt application and click "Run as administrator".
cdcommand to display the current directory and change to any directory.
An alternative to consider is to use PowerShell where the
pwd command is
pwdcommand on Windows in PowerShell
To use the
pwd command on Windows in PowerShell:
pwd command directly in PowerShell to display the current drive and
If you need to open PowerShell in a specific folder:
Shiftand right-click in Explorer.
pwd command in PowerShell is an alias for the
If you get a permissions error, you have to run PowerShell as an administrator.
To run PowerShell as an administrator:
pwdcommand to display the current directory.
pwdcommand in Git Bash by installing
giton your Windows machine.
If you already have
git installed, you can search for
Git Bash and use the
pwd command, otherwise, you have to install
pwdcommand on Windows in Git Bash
git and be able to use Git Bash:
Next on the screen that prompts you to "Select Start Menu Folder".
On the next screen, you can choose the default editor for
Notepad++ or any other editor you prefer.
Installbutton to install
Once you have
git installed, click on the Search field, type "Git Bash"
and start the application.
Now you can use the
pwd command directly in Git Bash.
If you need to open Git Bash in a specific folder:
Now you can use the
pwd command to display the current drive and directory.
You can learn more about the related topics by checking out the following tutorials: