IMB писал(а): ↑31.10.2018 10:16
Debian м думаю его производные
Эту штука меняет редактор по умолчанию на системном уровне для всех пользователей сразу. При этому, если EDITOR переопределен на уровне пользователя в том же .bashrc, то эта штука не поможет.
Hephaestus писал: ↑31.10.2018 10:38
Прописывать это можно на разных уровнях: на системном или на пользовательском.
Можно в .bash_profile. А где-то можно и в .bashrc
Бывает и в /etc/bashrc.
Это четко в man'e прописано:
Код: Выделить всё
INVOCATION
<..>
When bash is invoked as an interactive login shell, or as a non-inter‐
active shell with the --login option, it first reads and executes com‐
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior.
~/.bashrc много где используется, потому что он обычно прописан в ~/.bash_profile следующим образом:
Код: Выделить всё
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
@
azsx
Вышеперечисленные файлы просто считываются шеллом при запуске. Это равносильно тому, что после запуска вы бы просто запустили руками всё что там написано.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.