由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - Newbie question
相关主题
小白问个csh的问题Evolution email client s...l...o...w...
TCSH里怎么用setenv把一个带有空格的路径加给$PATH? (转载)bash中比较无聊的功能
setting PATH; how?新手问个shell的问题
setting up bash如何
找不到命令的路径.bash_profile not run when opening a terminal from desktop
设置环境变量求助。ubuntu无法上下箭头呼出历史命令
bin run as root, 它会不会pick up /root/.bashrc里的setting ?echo $VAR is not working in bash shell script ?
当前登录后默认是用csh,怎么能改成默认bash呢?不用安装的trash bin?
相关话题的讨论汇总
话题: ld话题: library话题: path话题: bash话题: bashrc
进入Linux版参与讨论
1 (共1页)
l*f
发帖数: 218
1
我对linux不熟悉,想在Fedora里设置LD_LIBRARY_PATH,网上找到一个instruction,不
是很理解
1.) use < .bashrc > file in your home directory (instead of .bash_profile)
2.) add the following line to this file :
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
3.) also add this line to < /etc/ld.so.conf > file
4.)run /sbin/ldconfig after /etc/ld.so.conf changing
请问1.)里面.bashrc跟.bash_profile都是什么用的, 如何知道bash启动之后调用那个
设置
l*f
发帖数: 218
2
补充一下,系统里找不到这两个文件,会是什么原因

【在 l*f 的大作中提到】
: 我对linux不熟悉,想在Fedora里设置LD_LIBRARY_PATH,网上找到一个instruction,不
: 是很理解
: 1.) use < .bashrc > file in your home directory (instead of .bash_profile)
: 2.) add the following line to this file :
: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
: 3.) also add this line to < /etc/ld.so.conf > file
: 4.)run /sbin/ldconfig after /etc/ld.so.conf changing
: 请问1.)里面.bashrc跟.bash_profile都是什么用的, 如何知道bash启动之后调用那个
: 设置

d********t
发帖数: 9628
3
I think do it only in .bashrc is enough.

【在 l*f 的大作中提到】
: 我对linux不熟悉,想在Fedora里设置LD_LIBRARY_PATH,网上找到一个instruction,不
: 是很理解
: 1.) use < .bashrc > file in your home directory (instead of .bash_profile)
: 2.) add the following line to this file :
: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
: 3.) also add this line to < /etc/ld.so.conf > file
: 4.)run /sbin/ldconfig after /etc/ld.so.conf changing
: 请问1.)里面.bashrc跟.bash_profile都是什么用的, 如何知道bash启动之后调用那个
: 设置

u*********r
发帖数: 2735
4
man bash (command line or google it)
search bashrc and bash_profile

【在 l*f 的大作中提到】
: 我对linux不熟悉,想在Fedora里设置LD_LIBRARY_PATH,网上找到一个instruction,不
: 是很理解
: 1.) use < .bashrc > file in your home directory (instead of .bash_profile)
: 2.) add the following line to this file :
: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
: 3.) also add this line to < /etc/ld.so.conf > file
: 4.)run /sbin/ldconfig after /etc/ld.so.conf changing
: 请问1.)里面.bashrc跟.bash_profile都是什么用的, 如何知道bash启动之后调用那个
: 设置

m*********g
发帖数: 273
5
In your home directory:
ls -al
if .bashrc is not there, you can create one. You can define your bash
behaviour there.
For example: if you put
alias rm='rm -i'
in .bashrc, every time you run rm, it will ask you to confirm.
m*********g
发帖数: 273
6
I think modif the .bashrc is enough for you.
If you are new to Linux, don't try to modify the config (system wide) uder /
etc or /sbin. Also you have to be root to do that. Ask you system
administrator for help if it is a company computer. If it is your personal
pc, play with it but please back up your data.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
3.) also add this line to < /etc/ld.so.conf > file
4.)run /sbin/ldconfig after /etc/ld.so.conf changing
l*f
发帖数: 218
7
thanks, i have fixed the problem
Besides, i want to change shell but there seems some problem
i use chsh and the terminal says shell changed already. however, when i try
echo $SHELL, terminal says i am still in bash

/

【在 m*********g 的大作中提到】
: I think modif the .bashrc is enough for you.
: If you are new to Linux, don't try to modify the config (system wide) uder /
: etc or /sbin. Also you have to be root to do that. Ask you system
: administrator for help if it is a company computer. If it is your personal
: pc, play with it but please back up your data.
: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ; export LD_LIBRARY_PATH
: 3.) also add this line to < /etc/ld.so.conf > file
: 4.)run /sbin/ldconfig after /etc/ld.so.conf changing

v*****r
发帖数: 1119
8
Make sure your "chsh" is not sym-lined to bash.
Also for your original questions, .bash_profile is the login shell for bash
and .bashrc is the interactive shell for bash; Understanding a few basic
concepts in unix/linux will help:
1. login shell vs interactive shell?
2. environment variables vs shell variables?
Once you understand the above two questions, the following rules (a lots of
folks don't follows them since they never bother trying to understand the
basic things:-):
1. Set all environme
l*f
发帖数: 218
9
谢谢大侠 因为我要装一个软件要修改到LD_LIBRARY_PATH,后来意识到要早csh里运行
用setenv就可以了
关于chsh的问题 有的时候可以switch到csh 有的时候明明propmt shell changed echo
$0发现还是在bash

bash
of

【在 v*****r 的大作中提到】
: Make sure your "chsh" is not sym-lined to bash.
: Also for your original questions, .bash_profile is the login shell for bash
: and .bashrc is the interactive shell for bash; Understanding a few basic
: concepts in unix/linux will help:
: 1. login shell vs interactive shell?
: 2. environment variables vs shell variables?
: Once you understand the above two questions, the following rules (a lots of
: folks don't follows them since they never bother trying to understand the
: basic things:-):
: 1. Set all environme

1 (共1页)
进入Linux版参与讨论
相关主题
不用安装的trash bin?找不到命令的路径
问一个 remote terminal 的Shell 问题设置环境变量求助。
哪位大牛来普及一下 linux 下面的各种环境变量以及设置bin run as root, 它会不会pick up /root/.bashrc里的setting ?
新手问问题,在Mac里用linux当前登录后默认是用csh,怎么能改成默认bash呢?
小白问个csh的问题Evolution email client s...l...o...w...
TCSH里怎么用setenv把一个带有空格的路径加给$PATH? (转载)bash中比较无聊的功能
setting PATH; how?新手问个shell的问题
setting up bash如何
相关话题的讨论汇总
话题: ld话题: library话题: path话题: bash话题: bashrc