Creating a Shell Alias
You can create small shortcuts or aliases in your shell to make remembering/typing commands easier. Add them to your ~/.bashrc
(or ~/.zshrc
if you use zsh
) to make them persist across sessions:
# This alias will 'cd' to your OS repo:
alias os='cd /raid/$(whoami)/os-*'
# Another common alias is 'll', which maps to ls -l:
alias ll='ls -l'
$ ll
(a long-format listing of the directory appears)
# Or you could even make 'll' show hidden files too with the -a flag:
alias ll='ls -l -a'
# Here's another one. Maybe you don't like having to type 'man' to get help on
# the various commands and functions:
alias huh='man'
# or even:
alias wtf='man'
# Then you can do:
$ wtf 3 printf