Normalerweise auf Ubuntu ${HOME}/.profile
Quellen ${HOME}/.bashrc
Beispiel aus meinem Lager ${HOME}/.profile
:
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
${HOME}/.profile
auf Session Login stammt.
Es gibt etwas, das Sie vielleicht wissen sollten. Soweit ich weiß, ist die ${HOME}/.bashrc
auch in jeder Login-Shell enthalten.
Diese Eigenart bewirkt, dass ${HOME}/.bashrc
zweimal Quellen sind; Einmal beim Session Login und einmal bei der Login Shell (Start eines Terminals).
Aber ich kann nicht helfen, sich zu fragen: Wenn Ihre .profile
in /etc
ist Sie ${HOME}
auch /etc/
? Das würde Probleme verursachen, da Sie dort keine Schreibberechtigungen haben, und alles ist relativ zu ${HOME}
Hoffe es hilft.
UPDATE
Von /etc/skel/.profile:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
Also, setzen, wenn bash einen .bash_profile
in Ihrem ${HOME}
effektiv Ihre .profile
überschrieben.
Wie auch immer, alles hängt davon ab, was in Ihrem /etc/.profile
vor sich geht.
Ausgezeichnet. Danke. Ich musste nur zum bashrc hinzufügen. Ich bin neu in Linux. –
Glücklich zu helfen :-) – totoro