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:

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 > /dev/null"

Get your current IP address and ISP

$ alias gip="curl && curl"

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"

A more secure version using urandom.

Unsupervised Learning — Security, Tech, and AI in 10 minutes…

Get a weekly breakdown of what's happening in security and tech—and why it matters.

$ alias sp="echo -n `python -c ‘from os import urandom; print(urandom(32).hex())’`"

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"

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

Make sure that command executes

$ alias fucking="sudo"

$ alias isaid="sudo"


  1. I also use zsh instead of bash.

Related posts: