Basics of Bash

Theory: Making custom commands with aliases

Lesson notes

  • alias to view all aliases
  • alias name='command' to create a new alias named name for the command command (e.g. alias lss='ls | sort -r')
  • unalias name to unalias an alias named name

Some useful aliases

  • alias c='clear' — clears the screen with c
  • alias ..='cd ..' - quickly go one level up with ..
  • alias h='history' — quickly access history with h