ruk·si

🐧 Linux
Filenames

Updated at 2024-10-30 03:34

On most Linux file systems, filenames can be up to 255 characters long.

Filenames may technically contain any characters except:

  • slashes (/)
  • null characters (\0)

Filenames should practically contain only:

  • English letters
  • digits
  • periods (.)
  • underscores (_)
  • hyphens (-)
"portable" filename characters:

[.-_a-zA-Z0-9]

Avoid filenames beginning with a hyphen (-), since such filenames may be mistaken for options when specified in a shell command.

Filenames are case-sensitive on Linux, so file.txt and File.txt are two different files. This is in contrast to Windows, where filenames are case-insensitive.