Linux Rename Folder Command

Originally published at: https://www.cyberciti.biz/faq/linux-rename-folder-command/

I am a new Linux system user. How do I rename a folder on Linux operating system using the command line? How can I rename a directory via the bash command line option?

mv xxx yyy
mv oldname newname