Ubuntu Installation :: Where Is .bashrc File On 9.10
Feb 17, 2010
I am using Ubuntu 9.10. I was installing network simulator 2. After installation I get the following message.
Please put /home/administrator/Downloads/ns-allinone-2.34/bin:/home/administrator/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/administrator/Downloads/ns-allinone-2.34/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
[Code].....
My friend suggested that it is something to do with .bashrc file. I fund files like .bash.bashrc.
I want to play around my .bashrc file, but I can't seem to find a general guide to customizing it. I just want a guide that will show me examples and explain them in-depth.
I am trying to include my directory /usr/sbin in it's serch path for executable files using an environment variable. Would the input be: PATH="/usr/sbin"? And also upon start up, my shell should create the PRINTER environment variable which should resolve to the word sales...would that input be: PRINTER="sales"? If someone could help me with these two questions,
The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.
I have a problem with my script. The problem is the system keeps rebooting after I put the directory file in .bashrc. The intentional for putting the file in .bashrc is to run the script automatically after login as root, I don know why is this happen. It was working fine for the first time without putting the file in bashrc. I could break the loop after hitting the "ESC" key. would it be the script problems?
Here is my script count=20 while [ $count -gt 0 ];do sleep 1 echo Press ESC to break the operation ((count=count-1))
I have installed a software and set the variables in the .bashrc file to avoid setting them everytime I would like to run te software. Now I have installed a new software and would like to do the same thing in the .bashrc file.How can I add the path to the new software directory without affecting the first software path.
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
recently I did some changes to my bashrc file the changes are as follows export JAVA_HOME=/usr/java/jre<version>/bin/ export PATH=$PATH:/usr/java/jre<version>/bin
If I want to modify my .bashrc file to change the HISTSIZE would the following command be for example; HISTSIZE=200? And if I want to change the DEBUG_LEVEL to 8 would the following command be; DEBUG_LEVEL=8?
I am having a lil headache with it. Some time ego i edited my /etc/bashrc file to add some aliases and colours for my ssh console. Today i had a need to change few thing but for some reason i can't edit or delete this file any more.
I am logged as root.
rm bashrc cannot remove, operation not permitted
chown and/or chmod fails as well with "not permitted" errors.
ls -Al | grep bashrc -rw-r--r-- 1 root root 2514 mar 31 13:05 bashrc
I got myself a .bashrc file off the net. I checked it beforehand, didn't detect anything bad about it. One thing that's odd about it, is that several spaces are added to the terminal command line.Screenshot:Those spaces are not put there by me. The file can be found here: [URL]..
how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:
[Code]....
Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.
I tried to make a function to put in either my .bash_aliases or .bashrc file to make a local backup of a file, but when I call the function and try to use tab completion I get the following error:
Code: cp: cannot stat `help': No such file or directory The function I added is as follows: Code: function bk
[Code]...
Also interestingly, if I define this function at the prompt rather than in my .bashrc, tab completion works fine.
how to edit or add codes to ~/.bashrc?? and also what is this bashrc if anyone could explain... i have tried editing this bashrc without success... how to save the changes in bashrc...
I have what I hope is a fairly simple question to answer. In my ~/.bashrc file I can create this alias:
Code: alias uChmodDP='chmod -R $1 $2' #specify permissions. and the variables work fine. But I cannot seem to get any love from this alias:
Code: alias umnt='umount /dev/$1' I realize the likely problem is the variable following hot on the heels of a specific directory, but is there anyway to specify a variable in an alias like this? For some reason I cannot umount usb pen drives by right clicking, and have to always resort to the terminal to do so, which for me is no real biggie, but if I could create this alias it would be an even better no biggie to umount using the terminal.
Actually, the inability to right click to umount usb devices seems to be a Thunar issue since I run xubuntu. Using Nautilus I am able to right click and eject/safely remove devices. Using Thunar however, right click unmount always pukes back an error that the device must have been mounted on the command line or some such BS. But like I said it is no real biggie to use terminal, but an alias would be even nicer. I prefer using Thunar and Xubu most of the time b/c my laptop is quite underpowered.
Rm: cannot remove `.bashrc': Operation not permitted
* ALL other files in /home/admin directory are able, only this one. * can't even change own, grp, just nothing * no matter if i'm doing it from root or admin
I was wondering whether anyone knows how to add preformatted text to the bashrc file? I'm ashamed to say I did already read this somewhere but had no use for it and as such forgot it! I'm possibly googling the wrong keywords, so apologies if it's an easy answer to find (with the right keywords!).
Just for completeness, the reason I'm doing my bit introducing my partner to linux, and I've 'embedded' a terminal on her desktop, I want to now add a little ASCII animal with a welcome message (I'm ok with getting the welcome message and colors sorted), much like the one seen in Linux Mint.
I,m having a rough time getting the terminal environment to recognize my android debug bridge path (which is set in a separate hdd) I used to paste this in my bashrc, but then found that it would make the env system bonkers whenever i attempted sudoing with an option:
# Android Debug Bridge (ADB) sdk path alias sudo='sudo env PATH=$PATH' export PATH=${PATH}:/media/Disk/Linux/Android/sdk/platform-tools/ The "alias" line was the one making me have a rough time with env. Now that i got rid of it everything is well but adb's path isn't exported anymore.
I'd like to know if there is a way to define commands in the .bashrc or .bash_profile. For instance, I want to be able to type 'work' in a terminal and set up an interactive work environment on my universities cluster. (This is done with the command 'qsub -I -X'.) I tried the following in my .bashrc file:
alias work ='qsub -I -X'
But, of course this failed, as I don't have a command work already defined. How do I go about doing this? Also, I can't assign 'qsub' an alias, since it's used with different options quite extensively.
I have been working on this script and I just made a ridiculous error. I tried to move my script out of my home directory and for some reason I put in "mv myscript .bashrc" Now my .bashrc file has nothing but my script in there... I think I may have overwritten some important info. Is running cp /root/.bashrc ~
I've installed python2.7 and I want all those convenient python libs I've installed from the repos to work with python2.7, but the libs in the repos get installed to python2.6.
No problem, I'll just set the $PYTHONPATH env var so that python2.7 will look at the python2.6 libs. I defined $PYTHONPATH as I wanted in the .bashrc file, and now python2.7 works as I desire when starting it from the shell.
The problem is when I start python2.7 from the gnome desktop (by clicking an application shortcut or button) it doesn't work. My guess is that the env vars set in .bashrc do not effect the gnome desktop, and so my question is what can I do to set an env var on the desktop?
To demonstrate my problem. If I open a bash shell and type "idle-python2.7 -n" idle will open, and I can "import twisted" without any problem in the idle python shell. However, if I do alt-f2 and run "idle-python2.7 -n" idle will still open but sys.path is not set as I would like and I cannot "import twisted". So there is clearly different behavior between an application started from the shell vs one started from the gnome desktop.
Environmental variables have long confused me, I'm also open to other solutions to my "getting python2.6 libs to run in python2.7" problem.
FULL INSTRUCTION: Both .bashrc and .gnomerc are located in your home directory. Put the following at the end of both files:
You should now be able to import the python libs installed from the repos in python2.7.