Portál AbcLinuxu, 21. května 2025 20:20
man bash ... When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc ... When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profileTakže asi tak
~/.bashrc
se načítá, pokud spustíš non-login shell (typicky xterm). Kdežto ~/.bash_profile
se spouští pokud máš neinteraktivní shell (skripty), anebo login shell.
Já to mám nastavené takto - vždy se provede nastavení z bash_profile
cat ~/.bash_profile [ -f ~/.bashrc ] && . ~/.bashrc
/etc/skel
...
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.