How to Rename a Directory in Linux

In Linux, renaming a directory is done using the mv command. It works by “moving” a directory to a new name within the same location.