system-type work perfectly in local machine. How do I check system-type when connecting to a remote server over tramp?

1 Answer 1


system-type does not exist for remote machines. However, Tramp caches the result of uname -sr for every remote machine, a string. You can retrieve it by

(when (file-remote-p default-directory)
   (tramp-dissect-file-name default-directory) "uname" nil))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.