Some of My Favorite Shell Aliases From Over the Years



Aliases are one of those things that follow you, from laptop to laptop, and server to server—like snippets of your educational DNA.



Here are some of mine that have followed me for two decades:



Sorry for the immature language. It’s funny; get over it.



Make sure that command executes


$ alias fucking="sudo"




$ alias isaid="sudo"



Type f to find things by name using find


$ alias f="find . -name"



A super quick speed test

You can do this with a utility, but I like using built-in tools as much possible.




$ alias bt="wget http://cachefly.cachefly.net/400mb.test > /dev/null"



Get your current IP address and ISP


$ alias gip="curl ipinfo.io/ip && curl ipinfo.io/org"



Always use ncat when I type nc

ncat is the nc equivalent within the nmap suite.




$ alias nc="ncat"



Find out what’s taking up space on your disk


$ alias s="du -hs * | sort -rh | head -5"



Create a quick password


$ alias np="openssl rand -base64 24"



Add color to grep output


$ alias grep="grep –color=auto -n"



Search your history for something, with colorized output


$ alias hs="history | grep –color=auto -n"



Notes


I also use zsh instead of bash.



I spend between 5 and 20 hours creating this content every week. Iif you're someone who can afford fancy coffee, please consider becoming a member for just $5/month…


Start Membership


Thank you,


Daniel

 •  0 comments  •  flag
Share on Twitter
Published on November 11, 2018 11:48
No comments have been added yet.


Daniel Miessler's Blog

Daniel Miessler
Daniel Miessler isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Daniel Miessler's blog with rss.