Linux extract subtitles or audio track from mkv file:

Install mkvtoolnix package using your package manager (in my case, Arch/Manjaro it was command: pamac build mkvtoolnix)

mkvmerge -i "/path/to/file.mkv"
(from the output, discover the ID of the subtitles to use in next command)
mkvextract tracks "file.mkv" 3:file.srt
(do not forget the .srt to prevent emptying the source file)