OS 확인

1 Java[ | ]

public class MyClass {
    public static void main(String[] args) {
        System.out.println( System.getProperty("os.name") ); // Linux
        System.out.println( System.getProperty("os.arch") ); // amd64
        System.out.println( System.getProperty("os.version") ); // 5.4.0-56-generic
    }
}

2 Python[ | ]

import platform
print( platform.system()   ) # Linux
print( platform.platform() ) # Linux-5.4.0-56-generic-x86_64-with-glibc2.2.5
print( platform.release()  ) # 5.4.0-56-generic
print( platform.version()  ) # #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}