mktemp - create a temporary file or directory safely
mktemp [-d] [-t] [TEMPLATE]
Options you will use
-d, --directory- Create a directory instead of a file.
-t- Interpret the template relative to $TMPDIR.
Examples
$ tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXITthe only correct temp-dir idiom
Try mktemp in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.