The 'mv' (move) command can also be used for renaming directories. Use the below-given format: mv directoryname newdirectoryname