Is there an equivalent of ~ from Unix systems in Windows cmd.exe?

Solution 1:

No.

You can use commands like cd /D %homedrive%\%homepath% or cd /D %userprofile% but typing them is just not the same even if end result is. The closest to the simplicity of cd ~ I've ever seen is Señor CMasMas's elegant solution below.

Create a new bat file with one single line:

@cd /d %UserProfile% –

Save it with name cd~.bat into any folder in your %PATH%. After that you can get from anywhere in the system back to home directory by typing command

cd~