How long can be files names and folder names in Ubuntu Linux and what characters are allowed in file name and folder name in Ubuntu Linux?
File names in Linux were 14 bytes long in earlier Unix version. But The modern Linux system has 255 bytes for file names.
As a character requires 1 byte, The length becomes 255 characters. Also the folders are treated as files in Linux system
See this link for more information
I'm not sure what the maximum file name length can be (for ext4), but it's more dependent on the file system, than Linux itself. On FAT32, I think it is 255 characters. You probably don't ever actually need a file name that long.
As for characters allowed, any byte value is allowed on the ext4 file system, except for the NULL byte (and
1. As stated in the glibc manual, "any character except the null character is permitted in a file name string," but a