温馨提示×

Debian getconf命令在哪

小樊
44
2026-07-29 13:13:30
栏目: 智能运维

在 Debian 系统中,getconf 命令通常位于 /usr/bin/getconf,由 libc-bin 软件包提供。

1. 查看是否已安装

which getconf

type getconf

2. 查看属于哪个包

dpkg -S /usr/bin/getconf

通常输出类似:

libc-bin: /usr/bin/getconf

3. 如果未安装,安装方法

sudo apt update
sudo apt install libc-bin

4. 常见用法示例

getconf LONG_BIT        # 查看系统是 32 位还是 64 位
getconf PAGE_SIZE       # 查看内存页大小
getconf -a              # 列出所有系统配置变量

如果你是在 精简容器(如 Docker 基础镜像) 里找不到 getconf,多半是 libc-bin 没装,手动安装即可。

0