How can I get rid of something running on every new terminal session?

后端 未结 7 2058
别跟我提以往
别跟我提以往 2021-02-10 02:27

I am using Lion. I have an error that outputs on every new terminal session:

-bash: __rvm_add_to_path: command not found

It\'s an almost brand

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-10 03:04

    Bash loads a series of files during startup. A good overview of the bash startup process can be found here.

    Generally, the global settings, /etc/profile, /etc/bashrc, and the associated personalized settings, ~/.profile and ~/.bashrc are loaded, although that is slightly distribution-dependant (and on Mac OS X, for example, by default /etc/profile doesn't exist).

    From the RVM Installation page:

    Multi-User:

    The rvm function will be automatically configured for every user on the system if you install as root. This is accomplished by loading /etc/profile.d/rvm.sh on login. Most Linux distributions default to parsing /etc/profile which contains the logic to load all files residing in the /etc/profile.d/ directory. Once you have added the users you want to be able to use RVM to the rvm group, those users MUST log out and back in to gain rvm group membership because group memberships are only evaluated by the operating system at initial login time.

    I'd guess that the other use has installed in Multi-User mode; /etc/profile probably loads /etc/profile.d/rvm.sh.

    To stop it being loaded, you could remove the source RVM line from /etc/profile - this will stop it being loaded for all users, though.

提交回复
热议问题