gpt4 book ai didi

linux - 关于bash命令/Linux的两个问题

转载 作者:太空宇宙 更新时间:2023-11-04 05:05:06 24 4
gpt4 key购买 nike

我需要这些问题的答案:

  1. 如何以及在哪里可以更改 Linux 中用户配置文件中的默认应用程序?
  2. 如何在不退出的情况下保存 vi 编辑器中的更改?我猜是w q q!但我不确定。

最佳答案

How and where can I change default app in user profile in Linux?

我猜你指的是编辑器。如果是这样,请使用以下命令:

export EDITOR=vi #or whatever other editor

要使其永久化,请将此行添加到用户主目录中的 .bashrc 文件中,即 ~/.bashrc 中。

<小时/>

How can I save changes in vi editor without exiting? I guess it's w q q! but I'm not sure.

使用:w保存。您必须处于命令模式(按 Esc 进入命令模式)。

关于linux - 关于bash命令/Linux的两个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17744564/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com