Nautilus has the option to see the mime-type of a file.
Can I see that in elementary OS without Nautilus?
elementary OS Stack Exchange is a question and answer site for developers and users of elementary OS and applications. It only takes a minute to sign up.Sign up to join this community
In Pantheon Files:
Right click on a file, Properties:
The above may give a different result than
file --mime-type, so maybe this one is also useful.
To add an option for that in the context menu of the file manager:
Installing gedit as text editor:
sudo apt-get install gedit
Installing Gnome Terminal for the option to hold terminal open:
sudo apt-get install gnome-terminal
Open gnome-terminal, Edit - Profiles, create new profile called 'hold'
Edit, and under ' Title and command' - When command exists - Hold the terminal open.
sudo gedit /usr/share/contractor/show_mimetype.contract
[Contractor Entry] Name=Show mime-type Icon=/usr/share/icons/elementary/apps/128/application-default-icon.svg MimeType=application/octet-stream;application/binary Exec=gnome-terminal --profile hold -e 'file --mime-type -b %f'