当前bash会话的临时替代--config


0

我需要在Linux中使用某些程序的两个不同版本。我可以在两个程序版本之间切换 alternatives --config "program-name"。所以我的问题是我如何在不改变全局系统设置的情况下在本地执行当前bash会话的命令?

我觉得有点儿 chroot 命令。

Answers:


1

这可能还不够,但您可以添加

alternatives --auto program-name

到你的 .bash_logout 文件。然后用 alternatives --config program-name。这将使其成为全局更改,但在您注销时将其返回到先前的状态。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.