In this tutorial, we will understand and learn Linux Filenames and File extensions. Every file in the Linux operating system has a filename.
We can create files using the file management GUI applications like Files, Dolphin, etc. We can also create files using Terminal commands, Shell scripts.
Linux filenames can contain uppercase and lowercase letters[A-Z and a-z], digits [0-9], special characters like underscore , period,comma, etc. Filenames can be up to 255 characters long. If we exceed the limit, we usually get File name too long error.
A directory cannot have files with the same filename. However, files in different directories can have the same name.
Filename extensions describe the type and contents of the file.
For example, the extension *.txt is used for test files, *.html is used for HTML files, *.cpp is used for C++ source code files, the extension *.h is used for C++ header files, the extension .o is used for an object code file, etc.
Unlike Windows, the Linux operating system is case-sensitive for directory and file names.
On Linux, for example, array.cpp and Array.cpp are two distinct files.
Linux Commands Tutorial page:
More Information on Ubuntu Linux: