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...
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
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
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.
I know there are different process states in Unix such as Running, Sleeping and Zombie.When I run "ps -C firefox -o stat=" I get the output "s" which means sleeping.But there are also others like s+What are the different codes for process states in ps, and what do they mean
I realized I can watch DVDs on my laptop. I tried the first DVD that I had tried it on, and it didn't work. I am thinking this may be something to do with region codes. First of all, how do I see which region code I am currently on? Secondly, how do I reset the region code? Is there any way to use multiple region codes at once?
I have installed minecraft on Natty. I just wiped and reinstalled to Maverik and now i cannot get Java to install, which i have to have to play minecraft. Are there other programs or codes to install Java?
I would like to be able to enter codes. I have pressed ctrl alt f5, 6 etc and get to the black screen which asks for username and password. I enter the username and password that I use to log in, but I keep getting the message telling me that they are not correct.
I am learning exploit development and learning some stuff about shellcodes now! The shellcode is absolutely right and have tested it. I am using the following code...(created by me) to run my shellcode..
Code: // #include<stdio.h> we will not be needing this as we are not using any functions from the C library...Just basic logic of Pointers.. char shellcode[] = "x31xc0xb0x01x31xdbxb3x07xcdx80"; // basic exit shellcode int main() { int *ret; // a simple integer pointer pointing a address ret = (int *)&ret + 2; // change the address pointed by (*ret) = (int)shellcode; }
Compiling :- Code: aneesh@aneesh-laptop:~/articles/C$ gcc test.c -o test -fno-stack-protector Compiling gives no errors as expected..
Now the problem I am facing is that As I run the program :- Code: aneesh@aneesh-laptop:~/articles/C$ ./test Segmentation fault
1) i downloaded the latest linux kernel in hope that i will find the codes for the operating system the os but i cant locate any.so can any0ne tell me from where can i find what i am looking for?
2) c language used in the package i downloaded is though very close to the c i studied but there are places where it becomes tough for to comprehend the real significance of the lines. eg i never knew rhere is Display() a pre-defined function but i saw it somewhere as predefined.
/*The Parallel Hello World Program*/ #include <stdio.h> #include <mpi.h>
[code]...
My program is, I can't compile this program using gcc, and I can't find something like pgcc in ubuntu. How should I compile this program? After compiling, what should I do to run this program? Can I use something like mpirun to run it? I want to try to use both cores of my computer to run it and make it shows Node 1 also besides Node0.
I can't seem to get any of the alt-keys from my regular keys. (i.e. alt+(any key) does not give me the output that it normally should. For instance, I can't make the "does not equal" sign by pressing alt+= (alt+equal sign))Is there any way to enable all the keys in the MBP keyboard? Or am I just stuck without my dear alt-keys?
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 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.
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.
I've got a 'nested' for loop which has a grep in it, if the grep fails there's no output - however the error code is still $0 and the second for loop is still entered, there's also a grep in the second for loop.I guess ultimately what i need to know is whether there's a way of making grep generate an error code. when no results are found?
Allright so I installed Ubuntu a week ago, I realized by net is much slower on Ubuntu than on Windows. So I did some Googling and found out I have the wrong drivers.I'm trying to fix it from this link :[URL]When I try to write in Sudo codes into terminal they don't work. They ask for a password, I put mine in and press enter I get the following message :shayan@ubuntu:~$ sudo modprobe rtl8187shayan@ubuntu:~$
I just installed Ubuntu 10.10, and I really have no idea how to login. When I first start it up, it is a black screen and a lot of codes and stuff pop up. It says to login, so I do, but I don't know how to get past that. How do I get to the desktop? I have no one else to turn to...
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.