+4 votes
107 views
in Linux by (242k points)
reopened
Linux: Rename file - that's how it works

1 Answer

+5 votes
by (1.6m points)
 
Best answer

Rename file using the file manager
1st step:
2nd step:
3rd step:
Rename the file using the console

1st step:
2nd step:
Quick guide: Renaming in the file manager
Quick guide: Renaming in the console

In Linux, just like in Windows, files can be renamed with ease. All you need is a few clicks or a console command..

image image

Every suitable operating system should make everyday tasks as simple as possible for the user. Changing filenames on Linux operating systems is just as easy and intuitive as it is on Windows. We'll show you how to easily change the name of a file using the file manager or a simple console command.

Rename file using the file manager

In normal operation you will probably prefer to use the file manager. Renaming works just like it does on most other operating systems. Follow our step-by-step instructions or take a look at the brief instructions .

1st step:

image
Make a right click on the file you want to rename. A corresponding option should be found in the context menu. For example, under Ubuntu in the German version it says " Renaming ". This can vary depending on the operating system and language.

2nd step:

image
Enter a new name in the menu that appears . Make sure not to change the file extension if this is not desired. Some operating systems simply hide the extension so that you don't have to worry about it. In this case, however, the ending could be changed by the user. Confirm the change.

3rd step:

image
You have successfully changed the file name.

Rename the file using the console

As is often the case with Linux, there is also the option of changing a file name via the command line . The mv command, actually intended for moving files, is often used for this. However, it can also be used for renaming and is also very simple. Follow our step-by-step instructions or take a look at the brief instructions ..

1st step:

image
Open a new console window and navigate to the directory where the file is located. To do this, use the " cd " command until you reach your desired directory. Use the " ls " command to display the files contained in the directory.

2nd step:

image
Use the command mv <old name> <new name> to change the file name. You can have the file name inserted automatically with the [Tabulator] key. To do this, type in the unambiguous first letters and press the mentioned key. If you only want to change a small part of the file name, you can repeat the process for the second file name. Confirm the change with the [Enter] key.

Quick guide: Renaming in the file manager

  1. Make a right click on the file.
  2. Find the " Rename " entry (or something similar).
  3. Then define a new name .

Quick guide: Renaming in the console

  1. Open the command line .
  2. Navigate to the correct directory.
  3. Then enter : mv <old name> <new name>

...