You might have some misconfiguration. My comment above about extensions is incomplete. Linux does have a system based on analysing the first few bytes of a file ("magic" numbers) because many well-defined formats (executable binary, compressed files, database tables) conform to standards.
However, some tools (launch menus, and xdg-open included) use additional hints to identify specific file types.
The "file" command says this about the files in my home directory:
Paul--) file * > file.txt
Box: Bourne-Again shell script, ASCII text executable
D_Recovery: directory
Executor_1.txt: UTF-8 Unicode text
foo.txt: ASCII text, with escape sequences
mbox: ASCII text
myEnv: ASCII text
One: ASCII text
One Two Three: ASCII text
Pictures: directory
Primes: Bourne-Again shell script, ASCII text executable
SqlAwk_ENWL.log: ASCII text
SqlAwk_NG.log: ASCII text
Templates: directory
Three: ASCII text
Two: ASCII text
UL_hSort.txt: ASCII text
wdog: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=9a15a7ca3bb94aed54a7a14fb9a11a2dd87d8baa, not stripped
wdog.c: C source, ASCII text
Xfers: broken symbolic link to /media/paul/0C6E70246E7008AA/Users/Paul/Downloads
When I run xdg-open UL_hSort.txt, the command prompt comes straight back, but it launches an independent GUI for an editor called Xed. It has a tab for the file, and if I hover over that it says it has a Mime type of plain text document with UTF-8 encoding.
I can run xdg-open with other files from the list, and it opens them as additional tabs in the same GUI. It even changes their Mime type, and does syntax colouring, if I save or reload the file. If I open a Jpeg, it launches a GUI for Xviewer for that file instead. If I open a .docx file (MS Word), it opens LibreOffice Writer for it. And so on.
cat,nano,vi, andvimcatwon't help you