how to rename the directory in terminal

Shell
mv [oldDirPath] [newDirPath]
Source

Also in Shell: