DEV Community

Cover image for Leveling Up Your Terminal/Command-Line Navigation

Leveling Up Your Terminal/Command-Line Navigation

Dylan Paulus on June 18, 2019

One motivating factor in using a terminal is the productivity gains... that is, once you can sweep the keyboard like an 80's metal guitarist. Getti...
Collapse
 
anduser96 profile image
Andrei Gatej • Edited

Thanks for sharing!

I would also add:

  • CTRL + SHIFT + T: create a new terminal tab

  • CTRL + SHIFT + W: close the current terminal tab

  • mkdir path/to/dir && cd $_: create a directory and cd into it as soon as it is created; the same concept can be applied to files

Collapse
 
mitjmcc profile image
Mitch McClellan

It would be useful to set an alias for that last one.

Collapse
 
thomasjunkos profile image
Thomas Junkツ • Edited

Little aside:

  • These are the default emacs-style commands.
    If you are more into vi there is the possibility to use that: set -o vi.

  • The use of a other shell than bash (e.g. zshell) will improve your experience further (TAB-completion is meh! under bash)

  • In case you intend to use fish, you have to unlearn too many things. Use at your own risk.

Collapse
 
nghuuphuoc profile image
Phuoc Nguyen

Thank you for the great post. I didn’t know about ![#number].

Collapse
 
thomasjunkos profile image
Thomas Junkツ

Wait until you see !-2 ;)

Collapse
 
ganderzz profile image
Dylan Paulus

woah

Collapse
 
nikhilmadhamshettiwar profile image
Nikhil Madhamshettiwar

Thanks a lot for this.. you saved lot of my time :)