If you were not given a name when you were born, people would have a difficult time conversing with you. In the same way, files need to be assigned names when they are created so that they can be used later. There are some rules to be followed when naming your files on Linux:

Basic Conventions

  • File names are made up of alphabetic and numeric characters.
  • File names can be a maximum of 256 characters.
  • Underscores(_) and hyphens (-) are allowed in the filename.
  • File names often contain one or more extensions, which are usually 1-3 characters appended to the end of a file name and are preceded by a period (.). Extensions are used to identify the file type (e.g., .txt indicates that zoom.txt is a text file that can be opened in a text editor such as VI).
  • Although it does not go against naming conventions, directory names do not usually contain extensions.
  • File names in Linux are case-sensitive, meaning that Change.txt is a completely different file than change.txt.