Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)
share|improve this question
1  
As pointed out in comments to answers, this duplicates two existing questions: this and this. –  JdeBP Oct 28 '11 at 15:12
    
Windows also supports the pushd and popd commands, though with much less flexibility than, say, their bash versions. –  Keith Thompson Oct 29 '11 at 7:20
1  
@JdeBP what you called "this and this" , the two links are the same, should just read "this". –  barlop Nov 7 '11 at 13:26
    
No, barlop. Please apply some nous for once. A correct statement is that the second hyperlink, clearly a copy and paste error on my part, should be this, as given below in the comments if you'd only thought to look. –  JdeBP Nov 7 '11 at 13:34
    
@JdeBP You know you've written this this this and this so many times, in so many places, for this question, that it's difficult to see whether and when you're linking to a "this" that you've already linked to. I will clarify by putting them in one comment. and with no hovering required. superuser.com/questions/129969/… superuser.com/questions/332871 (journeyman also mentioned the 129969 one). –  barlop Nov 16 '11 at 16:03

2 Answers 2

up vote 1 down vote accepted
1.  
C:\blah>pushd a
C:\blah\a>popd
C:\blah>


2. 
cd %userprofile%

3. 
C:\>doskey gocq=cd c:\cq
C:\>gocq <ENTER>
C:\cq>
share|improve this answer

cd .. to go one level up

cd \ to go to the root level of the drive

cd %UserProfile% to go to the equivilent of /home - its c:/users/username in windows 7

share|improve this answer
    
I think by the previous directory they didn't mean to go up, but one step back in the "history", so to say. –  slhck Oct 28 '11 at 13:24
1  
ahh, that would be covered by this superuser.com/questions/129969/… –  Journeyman Geek Oct 28 '11 at 13:28
    
And the other cd command is covered by this SuperUser question. –  JdeBP Oct 28 '11 at 14:28
    
"cd /" really? come on man.. \\\\\\\\\\\\\\\\ You're not helping him by using forward slashes when writing what are blatantly windows directories. –  barlop Nov 7 '11 at 12:28
    
my bad. fixed. surprised no one caught it ;p –  Journeyman Geek Nov 7 '11 at 12:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.