where is the .bashrc file???
where is the .bashrc file???this sentence sums up pretty much all my problems.I' using Slackware 9.1 in my computer.I've recently installes a programm (network simulator 2)and each time I use it I have to set the Paths right from the strat because I can't find the .bashrc file.It has driven me mad!!!Should I create it by myself, where and how do I set the path?
P.S. I'm really new at this and I would appreciate it if someone could tell me some simple steps of what to do |
Kalimera!
Yep, you should create one yourself. Slack is minimalistic, Pat doesn't cusotmize things (or very little) for you. Most packages in slack will come as if you had built your LFS, no pre-fabed configurations. Cheers, Tink |
If you are new to something than you would be willing to learn - ain't you?!
now cdange into your home directory Code:
cd ~ Code:
ls -al | grep .bashrc and redefine your path i.e under bash Code:
export PATH=<YOUR_PATH>:$PATH !!! BUT CAUTION !!! putting PATH in your .bashrc will append the PATH each time you run a terminal, so it's better idea to use .bash_profile, whilch should be also in your home directory !!! LEARN !!! the DOT files under linux are hidden (system) files and not visible regards |
You should find an example in /etc/skel. Here is an example for one of my users:
Code:
# Duron 950 uilleann .bashrc file for user fancy |
Quote:
|
Use the .bash_profile file instead. This file is sourced when you log in. The .bashrc file is sourced every time you start a bash shell.
|
Thank you all for your quick reply.I did the following:
1)I typed ls -al | grep .bashrc into my home directory and I found no .bashrc file. 2)I created myself under the same directory a .bash_profile file (I used the vi editor to create the file and I saved it as .bash_profile under the home directory.Into the file I only wrote the path by typing export PATH=/home/...../..../.....:$PATH isnt't that right??Should I have added something else too??) 3)I rebooted my computer After doing all these I went to the directory that I have installed the simulator (I have installed it under the home directory , does this cause any problems??), I opened a terminal and I tried to run the simulator by typing the right order. The simulator wouldn't run unless I set the PATH in the terminal right from the start as before. Everything I did with the .bash_profile file is ignored and I have to set the path right from the beginning. What is wrong in all these?? P.S.I' m sorry for being so analytical but I' m completely lost |
export PATH=/home/...../..../.....:$PATH
The syntax is correct, but the paths themselves may be incorrect...what do you mean by "..../..../...."? Hoping to make this a little more clear for you, suppose you have a directory within $HOME which you want to add to your $PATH, and this directory is /home/xenia/simulator. In order to add this path to your $PATH variable, you'd do: export PATH=/home/xenia/simulator:$PATH or PATH=~/simulator:$PATH or PATH=$HOME/simulator:$PATH Each path added is separated by a colon. Also, make sure that the simulator binary is located in the specific path which is added to your $PATH variable...if it's in a subdirectory of that path it won't work. Rebooting is unnecessary...at most log out and log back in. |
hmm, are you using the x-termina or konsole.
try typing Code:
echo $PATH Code:
export | grep PATH this way you'll se if the chages took effect, also you don't have to reboot (my God - those are the bad habits of using windows) . In the worst case it's enough to login under X again but usually it's enough to start another XTerm. you might have different shell configured as default, also under KDE you must start konsole with the -ls option so that .bash_profile is read (simultates login shell) Finally it's not hard to write a script that is setting up the path but watch out to have the abbility to extend your path from your login script regards |
All times are GMT -5. The time now is 03:10 PM. |