一旦我进入ubuntu,我的PYTHONPATH就会显示
:/usr/local/opencv-2.4.13/build/modules/python:/usr/local/mxnet/python:/usr/local/caffe/python
我不想要这些开始设置,但是我不知道如何设置它们。它们未在.bashrc或.profile中设置。我还应该看哪里?
答案 0 :(得分:1)
要检查的位置的列表(包括这些文件中的任何一个源文件或运行的脚本,这意味着不足以grep
到该文件列表中查找有问题的变量)
/etc/profile
文件夹/etc/profile.d/
中的任何文件
/etc/environment
~/.bash_profile, ~/.bash_login, and ~/.profile
的第一个现有文件
/etc/bash.bashrc (or /etc/bashrc , depending on OS)
~/.bashrc
~/.pam_environment (when using ssh)
/etc/motd (when using ssh)
说明:
当bash作为交互式登录shell或通过--login选项作为非交互式shell调用时,它首先从文件/ etc / profile中读取并执行命令(如果该文件存在)。读取该文件后,它将按该顺序查找〜/ .bash_profile,〜/ .bash_login和〜/ .profile,并从存在的且可读的第一个命令中读取并执行命令。启动外壳程序时,可以使用--noprofile选项禁止这种行为。
启动不是登录shell的交互式shell时,bash会从/etc/bash.bashrc和〜/ .bashrc中读取并执行命令(如果存在这些文件)。使用--norc选项可以禁止这种情况。
成功登录后但在执行登录shell之前,pam_motd(8)显示/ etc / motd的内容。 缩写“ motd”代表“当天的消息”,并且该文件通常用于此目的(与发送给所有用户的邮件相比,它需要更少的磁盘空间)。 在Debian GNU / Linux上,还将显示/run/motd.dynamic的内容。该文件由/etc/init.d/motd在引导时生成。