ubuntu中启动系统后不自动执行source ~./bashrc的解决方法

 

1、问题,下载压缩文件后,不能显示压缩文件的颜色(红色),执行source ./bashrc后系统可以显示

问题如下,因此推测是系统启动时没有自动执行source ./bashrc

ubuntu中启动系统后不自动执行source ~./bashrc的解决方法

 

 

2、解决方法,在~/.bash_profile增加如下语句:

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

 

ubuntu中启动系统后不自动执行source ~./bashrc的解决方法

 

 

3、重新启动一个终端进行测试,重新下载一个压缩文件看是否能自动变色

ubuntu中启动系统后不自动执行source ~./bashrc的解决方法

 

 没问题。

 

上一篇:Facebook最新的曝光模式有哪些?


下一篇:跨境电商独立站Tiktok、Facebook ip环境搭建