how to change a file in linux code example Example 1: linux change file name mv oldfile.txt newfile.txt Example 2: linux edit file sudo nano filename.ext