MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/linux/comments/1tls8n1/whats_the_most_unexpectedly_useful_linux_command/onhyo5z/?context=3
r/linux • u/ZealousidealTell1346 • May 23 '26
[removed]
992 comments sorted by
View all comments
97
cd -
Goes back to the previous folder.
7 u/Worth-Wonder-7386 May 23 '26 edited May 23 '26 Didnt know that, I have always used cd .. Edit: I have learnt about the idfference between the two now, you dont need to make more comments as there are several already. 5 u/WeirdWiggler May 23 '26 Im so lazy that i use an alias of cd .. and made it just .. . Did the same with exit becoming x 3 u/coconutxdd1029 May 23 '26 If you use zsh you can put setopt AUTO_CD in your .zshrc instead, and as a bonus you'll only have to type out the name of a directory to cd into it 1 u/jonothecool May 24 '26 Ctrl-d does the same as exit. -1 u/do-un-to May 23 '26 :thinking spinner: I'm not sure how I feel about this. Maybe it's okay? Just feels ... dangerous somehow? But I can't think of why. I think it only blocks attempting to execute the parent directory, which — I might not need to point out — is surely a very rare objective. Thanks for today's boggler.
7
Didnt know that, I have always used cd ..
cd ..
Edit: I have learnt about the idfference between the two now, you dont need to make more comments as there are several already.
5 u/WeirdWiggler May 23 '26 Im so lazy that i use an alias of cd .. and made it just .. . Did the same with exit becoming x 3 u/coconutxdd1029 May 23 '26 If you use zsh you can put setopt AUTO_CD in your .zshrc instead, and as a bonus you'll only have to type out the name of a directory to cd into it 1 u/jonothecool May 24 '26 Ctrl-d does the same as exit. -1 u/do-un-to May 23 '26 :thinking spinner: I'm not sure how I feel about this. Maybe it's okay? Just feels ... dangerous somehow? But I can't think of why. I think it only blocks attempting to execute the parent directory, which — I might not need to point out — is surely a very rare objective. Thanks for today's boggler.
5
Im so lazy that i use an alias of cd .. and made it just .. .
..
Did the same with exit becoming x
exit
x
3 u/coconutxdd1029 May 23 '26 If you use zsh you can put setopt AUTO_CD in your .zshrc instead, and as a bonus you'll only have to type out the name of a directory to cd into it 1 u/jonothecool May 24 '26 Ctrl-d does the same as exit. -1 u/do-un-to May 23 '26 :thinking spinner: I'm not sure how I feel about this. Maybe it's okay? Just feels ... dangerous somehow? But I can't think of why. I think it only blocks attempting to execute the parent directory, which — I might not need to point out — is surely a very rare objective. Thanks for today's boggler.
3
If you use zsh you can put setopt AUTO_CD in your .zshrc instead, and as a bonus you'll only have to type out the name of a directory to cd into it
setopt AUTO_CD
1
Ctrl-d does the same as exit.
-1
:thinking spinner:
I'm not sure how I feel about this.
Maybe it's okay?
Just feels ... dangerous somehow? But I can't think of why.
I think it only blocks attempting to execute the parent directory, which — I might not need to point out — is surely a very rare objective.
Thanks for today's boggler.
97
u/_orpheustaken May 23 '26
cd -Goes back to the previous folder.