博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
There is no ~/.bashrc to setup user $PATH
阅读量:4138 次
发布时间:2019-05-25

本文共 717 字,大约阅读时间需要 2 分钟。

After add user in Ubuntu, there is no ~/.bashrc under user home for me to setup my own user $PATH.

 

1. man bash

 

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads  and  executes  commands from  the  file  /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.  The --noprofile option may  be  used  when  the  shell  is started to inhibit this behavior.

 

2. 

#touch ~/.bash_profile

#vim ~/.bash_profile

 

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

3.

#touch ~/.bashrc

#vim ~/.bashrc

export PATH=$PATH:....

 

 

 

 

 

 

 

转载地址:http://jemvi.baihongyu.com/

你可能感兴趣的文章
自定义控件:动态获取控件的高
查看>>
第三方开源库:nineoldandroid:ValueAnimator 动态设置textview的高
查看>>
第三方SDK:百度地图SDK的使用
查看>>
Android studio_迁移Eclipse项目到Android studio
查看>>
JavaScript setTimeout() clearTimeout() 方法
查看>>
CSS border 属性及用border画各种图形
查看>>
转载知乎-前端汇总资源
查看>>
JavaScript substr() 方法
查看>>
JavaScript slice() 方法
查看>>
JavaScript substring() 方法
查看>>
HTML 5 新的表单元素 datalist keygen output
查看>>
(转载)正确理解cookie和session机制原理
查看>>
jQuery ajax - ajax() 方法
查看>>
将有序数组转换为平衡二叉搜索树
查看>>
最长递增子序列
查看>>
从一列数中筛除尽可能少的数,使得从左往右看这些数是从小到大再从大到小...
查看>>
判断一个整数是否是回文数
查看>>
经典shell面试题整理
查看>>
腾讯的一道面试题—不用除法求数字乘积
查看>>
素数算法
查看>>