欢迎使用CSDN-markdown编辑器
来源:互联网 发布:淘宝客服专用语言 编辑:程序博客网 时间:2024/06/02 06:37
/etc/profile 对于全部用户有效
~/.bashrc 对当前用户有效
Ubuntu文件中,用户目录下不存在.bash_profile文件,如果新建该文件并将环境变量添加到该文件中
vim .bash_profileexport PATH=$PATH:/home/gaoyang/rpi-src/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
加载.bash_profile
source ~/.bash_profile
secureCRT登录时发现ls命令后,文件无色彩区别。
网上搜索
Linux中profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile文件的介绍
后查看/.profile文件的描述(Ubuntu)
# ~/.profile: executed by the command interpreter for login shells.**# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login# exists.**# see /usr/share/doc/bash/examples/startup-files for examples.# the files are located in the bash-doc package.# the default umask is set in /etc/profile; for setting the umask# for ssh logins, install and configure the libpam-umask package.#umask 022# if running bashif [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fifi# set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH"fi
如果存在.bashrc_profile文件,将不会调用.profile文件,最终导致使用secureCRT登录的界面,没有色彩区分(未调用.bashrc文件,该文件中有对颜色的设置)。
于是将环境变量添加到~/.profile文件中:
export PATH=$PATH:/home/gaoyang/rpi-src/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
加载.profile文件:
source ~/.profile
问题解决。
http://blog.csdn.net/gatieme/article/details/45064705
0 0
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 机器学习(一):KNN算法
- 文章标题
- JAVA基础知识面试题集
- TreeDp POJ2342 Anniversary party
- Causal Inference 学习(一):Assignment Mechanism
- 欢迎使用CSDN-markdown编辑器
- 二层转发和三层交换
- vfp 使用 .Net 系统自带的组件
- 字符串对象的各种方法
- Linq to Lis
- 测试框架 Mocha 实例教程
- boost编译
- Git(5)/分支管理
- Android Studio NDk-JNi开发(二)AS下开发流程