Aliases in Bash are a useful and powerful way of simplifying commonly used commands/options. [[linux:zsh|ZSH]] comes with a number of aliases automatically but you may well wish to define your own. Generally though you're better off writing a short function to do things. # Aliases ```bash alias ip='ip -c' alias shutup='su -c "shutdown -h now"' alias restart='su -c "reboot"' alias sleep='su -c "hibernate-ram"' ``` # Functions There are some very neat [Awesome Command Line Tools](https://github.com/chubin/awesome-console-services) such as [wttr.in](https:wttr.in/) ([GitHub](https://github.com/chubin/wttr.in)) and [cheat.sh](https://cheat.sh/) ([GitHub](https://github.com/chubin/cheat.sheets)) and so I set up a few functions... ```bash weather () { curl wttr.in/"$@" } weather2 () { curl v2d.wttr.in/"$@" } alias weather_sheffield='curl wttr.in/Sheffield' alias weather_high_neb='curl wttr.in/High+Neb' ## Linux commands https://github.com/chubin/cheat.sheets cheat () { curl cheat.sh/"$@" } ``` # Environment Variables These are not aliases but instead hold key parameters. ```bash # Add the date/time to HISTTIMEFORMAT="%Y/%m/%d %T " ```