我安装了 texlive,我想将其作为环境变量添加到我的 Path 中,以便当我从 GUI 或命令行启动 emacs 时,Emacs AucTeX 可以读取它。到目前为止,我已经了解到 emacs 只读取来自~/.profile
.
因此,我的计划是将 texlive 添加到我的路径中,.profile
以使 emacs GUI 能够读取它,然后~/profile
从中获取源代码.bashrc
,以便在我的非登录交互式 GNOME 终端中启动的 emacs 查看路径。
.profile
注意:我的主目录中没有文件,仅在我的/etc
目录中,我不想碰那个文件,但我.bash_profile
的主目录中有一个文件。但是我读到它.bash_profile
仅针对交互式登录会话(即我不使用的控制台模式)运行。
.profile
文件并执行以下操作:第 1 步:创建~/.profile
步骤2:将texlive环境变量添加到path中.profile
export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH
Run Code Online (Sandbox Code Playgroud)
步骤 3:.profile
来源.bashrc
#Adding this at the bottom or start of .bashrc to source .profile when the terminal is opened.
if [-s ~/.profile]; then;
source …
Run Code Online (Sandbox Code Playgroud)