how to change directory name in terminal code example Example 1: ubuntu rename folder sudo mv oldName newName Example 2: rename folder command line linux mv old-name new-name