在 Debian 系统中,getconf 命令通常位于 /usr/bin/getconf。
你可以用以下命令查看:
which getconf
或
command -v getconf
或
ls -l /usr/bin/getconf
如果系统中没有 getconf,一般是缺少了对应的软件包。在 Debian 中,getconf 属于 libc-bin 包。
安装方法:
sudo apt update
sudo apt install libc-bin
安装后再执行:
getconf -a
getconf LONG_BIT # 查看系统是 32 位还是 64 位
getconf PATH_SEPARATOR # 查看路径分隔符
getconf _NPROCESSORS_ONLN # 查看 CPU 核心数
如果你是在 容器 / 精简系统(如 Docker) 里找不到,多半就是没装 libc-bin。