Share via

How to use "cd" command in Windows

Anonymous
2011-07-21T15:23:23+00:00

Hi all, I'm a Linux user just starting to get the hang of Windows 7. How can one perform these functions with the Windows cd command:

  1. Go back to the previous directory (cd - in Bash)
  2. Go to the user's home directory (cd ~ in Bash)
  3. Bookmark a directory (not built into bash, but cdargs or DerB can be added)

Thanks!

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. @CmdrKeene 90,621 Reputation points Volunteer Moderator
    2011-07-22T13:48:07+00:00

    I don't know of a way to do that, but if you press F7 you can repeat previous commands in a popup, that might be helpful.

    Trick about the file and web browsers, you can still go "up" instead of back by pressing Alt-Up on the keyboard.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-07-23T13:53:48+00:00

    > Trick about the file and web browsers, you can still go "up" instead of

    > back by pressing Alt-Up on the keyboard.

    Thanks. I knew about that in the file browser, but not web browsers. Nice!

    0 comments No comments
  2. Anonymous
    2011-07-22T09:04:37+00:00

    > Go up a directory (back) is (cd, space, two periods):   cd ..

    Thanks. I do know how to go up, but how to go back? For instance:

    C:\Users\dotancohen\some\long\filepath>cd C:\Windows

    Now how would I get back to C:\Users\dotancohen\some\long\filepath

    I do know about pushd but that only helps if I explicitly know that I must go back before I switch directories. Much like a file browser or web browser has a back button (incidentally, neither have an Up button in Windows 7).

    0 comments No comments
  3. @CmdrKeene 90,621 Reputation points Volunteer Moderator
    2011-07-22T01:54:18+00:00

    In the Windows Command Shell:

    Go up a directory (back) is (cd, space, two periods):   cd ..

    Go to user's home is not a direct command but you can use a variable like this:  cd %userprofile%

    Not sure what you mean by bookmark, though.

    0 comments No comments