The actual meaning of generic "file metadata" would involve whatever information is not stored inside the file itself which is the data. It's data about the data.
Under such a meaning, metadata include (but are not limited to):
- Access rights
- Size in bytes and in blocks
- SELinux security context string
- User and Group ID of the owner
- Time of last modification
This type of information is normally stored into the filesystem and not into the file itself.
Now, as far as Linux (and Unix-like) CLI is concerned, there is a small nifty tool called stat which can provide all available metadata for a file, a file system or any other file system-related item (like directories, devices and named pipes).
It uses a printf-like notation to define the actual information to be printed out, or a default selection when such an option is not used.
This is an example run:
[enzo@Feynman ~] stat /etc/hosts
File: /etc/hosts
Size: 139 Blocks: 8 IO Block: 4096 regular file
Device: 10303h/66307d Inode: 268684872 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-09-14 18:00:17.200000397 +0200
Modify: 2021-09-14 17:59:37.506668910 +0200
Change: 2021-09-14 17:59:37.520002245 +0200
Birth: 2021-09-14 17:59:37.506668910 +0200
The earlier answer shows a mix of file metadata and data extracted with a specific tool for each file type, so it is not strictly about metadata.
On the other hand, stat is more generic and works on any file object and doesn't access the file data itself.
For extra details about the actual content type, thus not really metadata in the strict sense, you can make use of the ubiquitous file tool which uses a large "signature" database (the magic numbers database) to guess the file content, no matter what its name can be: it doesn't use the so-called file name extension.