Skip to content

Instantly share code, notes, and snippets.

@nepsilon
Last active December 25, 2021 08:20
Show Gist options
  • Save nepsilon/ec9c35bbf284e07d359d to your computer and use it in GitHub Desktop.
Save nepsilon/ec9c35bbf284e07d359d to your computer and use it in GitHub Desktop.
Useful aliases for bash and zsh — First published in fullweb.io issue #17

Useful aliases for bash and zsh

Using aliases to give commands useful options by default is a good way to boost productivity.

Here are 5 aliases to put in your ~/.bashrc or ~/.zshrc to keep them permanently:

1. ls:

# ls: adding colors, verbose listign
# and humanize the file sizes:
alias ls="ls --color -l -h" 

2. grep:

# grep: color and show the line
# number for each match:
alias grep="grep -n --color" 

3. mkdir:

# mkdir: create parent directories
alias mkdir="mkdir -pv" 

4. ping:

# ping: stop after 5 pings
alias ping="ping -c 5" 

5. curl:

# curl: only display HTTP header
alias HEAD="curl -I"
# this create a new HEAD command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment