修改完linux bashrc文件之后,如何不重启系统使其生效

修改完后,输入如下命令即可

 ##@##:~/    source ~/.bashrc

之后bashrc文件就可以使用!

注: 使用ssh登陆shell的时候,系统不会自动调用.bashrc文件, 只是会自动的读取 如下三个文件:

 ~/.bash_profile , ~/.bash_login , ~/.profile 里面其中一个而已。

因此,如果想让系统每次登陆时候自动读取文件,可以将.bashrc文件改为.bash_profile

mv .bashrc .bash_profile

原文地址:https://www.cnblogs.com/EdwinChan/p/8507537.html