Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerShell command to move to the root directory

Commands for changing the directory, using cd, are the same in PowerShell as in cmd.

However, the problem occurred when I wanted to move to the root directory.

If I'm on disk C, just write

cd C:\

However, in cmd it was possible to use a simpler command.

cd...

But, it is only possible in cmd. It does not work in PowerShell.

cd... : The term 'cd...' is not recognized as the name of a cmdlet, function, script file, or operable program. Check t he spelling of the name, or if a path was included, verify that the path is correct and try again.

Is there any alternative to this command in PowerShell, please?

Thank you

like image 993
Michal Rama Avatar asked Oct 29 '25 01:10

Michal Rama


1 Answers

Is this what your after?

PS C:\Windows\system32> cd\

PS C:\> 

Or do you want to move from 'C:\Windows\system32>' to 'D:\' which would just be >D:

like image 175
Duzzy Avatar answered Oct 31 '25 16:10

Duzzy