“dpkg-reconfigure keyboard-configuration” 实际上起什么作用?

“dpkg-reconfigure keyboard-configuration” 实际上起什么作用?

是否可以编写脚本来dpkg-reconfigure keyboard-configuration实际执行什么操作?

我总是做出相同的选择,所以如果我可以在无需任何用户交互的情况下完成此选择,那就太好了。

答案1

用 播种你的选项debconf并运行DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration

debconf 设置选择集 (1)

NAME
       debconf-set-selections - insert new default values into the debconf database

SYNOPSIS
        debconf-set-selections file
        debconf-get-selections | ssh newhost debconf-set-selections

这会显示您当前的设置:

$ debconf-show keyboard-configuration
  keyboard-configuration/modelcode: pc105
  keyboard-configuration/unsupported_config_options: true
  keyboard-configuration/unsupported_config_layout: true
  keyboard-configuration/toggle: No toggling
  ....

相关内容