Rename a Linux file: Commands and tips

by Pramith

If you want to rename a Linux file, there are various ways to do this. Both variants are quick and easy to carry out

Rename Linux file via file manager

If you want to change a file name on the Linux operating system, this is very simple. You generally have two options.

  • First option: You rename the file using the file manager. To do this, find the file and right-click on it with the mouse.
  • A context menu appears in which you select the “Rename” option.
  • Then enter the desired new name and confirm the change with “Enter”. Tip: Depending on the operating system, the extension of the file type may not be adopted. Make sure you use the correct identifier here – for example .png for an image format.

Second option: Rename file via console

In addition to the option described above, which is particularly suitable for everyday and ongoing operation on the PC, there is a second option.

  • This allows you to rename the file using the console. To do this, use certain commands.
  • First open a new console window in Linux and go to the directory in which the file you want to rename is located. To do this, use the “cd” command – until you have reached the target directory.
  • You can then use the “ls” command to display all the files contained in the directory.

Related Articles

Leave a Comment