我使用Ubuntu mini.iso安装简约主义的系统,取消所有软件选项,然后重新启动install、显示管理器(slim)和LXDE。当安装命令有不同的顺序时,是否存在安装包数量的差异,例如:
sudo apt --no-install-recommends install xorg slim lxde
sudo apt install xorg slim lxde --no-install-recommends
sudo apt install --no-install-recommends xorg slim lxde
如果存在差异,哪个命令变体安装的包数量最少?
发布于 2021-12-19 06:32:54
非选项和选项参数的顺序并不重要,除了相互冲突的选项(例如,apt ... --no-install-recommends ... --install-recommends ...
和apt ... --install-recommends ... --no-install-recommends
将有不同的行为)。您可以通过对以下每个命令添加一个--simulate
来轻松地测试这些命令:
# sudo apt --no-install-recommends install xorg slim lxde --simulate | grep -w and
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0 upgraded, 335 newly installed, 0 to remove and 1 not upgraded.
# sudo apt install xorg slim lxde --no-install-recommends --simulate | grep -w and
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0 upgraded, 335 newly installed, 0 to remove and 1 not upgraded.
# sudo apt install --no-install-recommends xorg slim lxde --simulate | grep -w and
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0 upgraded, 335 newly installed, 0 to remove and 1 not upgraded.
发布于 2021-12-19 06:33:32
您没有提供任何发布细节;如果涉及到不同的版本,这些命令可能有不同的需求(事实上,我希望如此,尤其是)。对于更现代的版本来说,LXDE并不是众多版本的Lubuntu包;它现在是纯Debian包)。
mini.iso
也不再产生;因为它是不再使用的过程的副产品(它从来没有得到Ubuntu或Canonical的完全支持)。看“MinimialCD的未来”在https://help.ubuntu.com/community/Installation/MinimalCD
规范化和Ubuntu项目从未正式支持mini.iso;它是作为构建debian的副产品产生的。由于Ubuntu映像现在使用subiquity,构建mini.iso的构建过程不再使用,这就是为什么这个安装媒体现在已经过时的原因。
要回答您的问题,不是,如果包是相同的,更改它们在命令中的出现顺序不会产生任何影响&发布细节是相同的;因为您似乎有相同的命令,只是操作数的顺序不同。
可能需要考虑到apt
中的差异,因为没有提供任何版本,所以这个建议是通用的&假设我的当前版本。
https://askubuntu.com/questions/1382729
复制相似问题