Now there is also a Linux subsystem for Windows (bash for Windows 10), where system-type is gnu/linux . To detect this type of system, use:
(if (string-match "Microsoft" (with-temp-buffer (shell-command "uname -r" t) (goto-char (point-max)) (delete-char -1) (buffer-string))) (message "Running under Linux subsystem for Windows") (message "Not running under Linux subsystem for Windows") )
Konrad Eisele Jul 18 '17 at 19:56 on 2017-07-18 19:56
source share