Delete file under Linux - how it works
The following practical tip shows you how to delete a file under Linux.
Delete files in Linux via the terminal
As an alternative to the traditional method, right-click> "Move to trash", you can delete your files directly from the console.
- Open the console with the key combination [Ctrl] + [Alt] + [T] or enter "Terminal" in the search bar.
- Navigate to the directory in which the file is located using the cd command.
- If you do not yet know which files are in the folder, the "ls" command will help you. You will receive a list of the files.
- Now enter "rm file name. File extension". An example would be "rm chipTest.txt" (see picture).
- Linux is case-sensitive and therefore pays attention to upper and lower case.
- Warning: The files do not end up in the trash, but are completely deleted.
If you want to delete a large file and do not know the exact path, you will find another practical tip on how to find large files under Linux.