Julia
的关于操作系统的信息可以通过 Sys
命令来得到,如
help?> Sys
search: Sys SystemError systemerror displaysize subtypes
Provide methods for retrieving information about hardware and the operating
system.
输入 Sys.
后按两次 tab
,可以查看
julia> Sys.
ARCH STDLIB eval iswindows
BINDIR UV_cpu_info_t free_memory loadavg
CPU_NAME WINDOWS_VISTA_VER get_process_title maxrss
CPU_THREADS WORD_SIZE include set_process_title
CPUinfo __init__ isapple total_memory
JIT _cpu_summary isbsd uptime
KERNEL _show_cpuinfo isexecutable which
MACHINE cpu_info islinux windows_version
SC_CLK_TCK cpu_summary isunix
可以尝试一下
julia> Sys.isapple()
true
julia> Sys.islinux()
false
julia> Sys.isunix()
true
julia> Sys.iswindows()
false