在 Debian 系统中,getconf 命令通常位于 /usr/bin/getconf,由 libc-bin 软件包提供。
which getconf
或
type getconf
dpkg -S /usr/bin/getconf
通常输出类似:
libc-bin: /usr/bin/getconf
sudo apt update
sudo apt install libc-bin
getconf LONG_BIT # 查看系统是 32 位还是 64 位
getconf PAGE_SIZE # 查看内存页大小
getconf -a # 列出所有系统配置变量
如果你是在 精简容器(如 Docker 基础镜像) 里找不到 getconf,多半是 libc-bin 没装,手动安装即可。