DEV Community

Discussion on: Terminal Cheat Sheet 🔥 - The most useful terminal commands 🚀

Collapse
 
fullstackchris profile image
Chris Frewin • Edited

👍 for cd -
Brings you to the previous location you were at :)

I always keep these alias with me on all machines, local and remote:

# opens .zprofile for editing (zsh profile)
alias prof='nano /<<ROOTDIRECTORYHERE>>/.zprofile' 
# opens .zshrc for editing
alias rc='nano /<<ROOTDIRECTORYHERE>>/.zshrc' 
# source profiles (should be done every time after changing profile)
alias s='source /<<ROOTDIRECTORYHERE>>/.zprofile; source /<<ROOTDIRECTORYHERE>>/.zshrc;'
# fancy ls
alias lk='ls -lhkart'
# for 'lk' typos ;)
alias kl='ls -lhkart' 
# open current folder in GUI
alias show='open .'
# go back a folder
alias back='cd ..'
# previous folder
alias prev='cd -'
# cd with no arguments brings you to your root folder :)
alias home='cd'
Enter fullscreen mode Exit fullscreen mode


👍

Collapse
 
devlorenzo profile image
DevLorenzo • Edited

Thanks, I'll add the list in the cheat sheet!