It is a function from InteractiveUtils, which is, by default, only loaded if you are in an interactive session:
%julia -e "using InteractiveUtils; versioninfo()"
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700F
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 20 virtual cores)
Environment:
JULIA_PKG_PRESERVE_TIERED_INSTALLED = true