Elisp: Get Operating System Type
Get Operating System Type
Here's how to find out what operating system emacs is running on.
(cond ((eq system-type 'windows-nt) (progn (message "is Microsoft Windows"))) ((eq system-type 'darwin) (progn (message "is Mac OS X"))) ((eq system-type 'gnu/linux) (progn (message "is Linux"))) ((eq system-type 'gnu/kfreebsd) (progn (message "is BSD"))) (t (progn (message "other"))))