made mistakes on bashrc-->think i corrupted my OS seriously

If it doesn't fit in another category, ask it here.
Post Reply
fgoncalo
Posts: 16
Joined: 2011/05/15 22:31:20

made mistakes on bashrc-->think i corrupted my OS seriously

Post by fgoncalo » 2011/05/25 12:49:52

So guys, hi again

I guess my CentOS experience is being kind of dramatic.
So, i had to change my bashrc because i had to install some programs in order to finally install "Maker". I had to add the $PATH in the bashrc, so that maker would recognize that those previous programs were installed. And thats when things went really bad. I've must have typed all those new $PATH wrong. That made me loose all the bash comands, even the more simple ones, such us ll etc etc. "bash: "command: Not found"
But it gets worst, i had to reboot the VM...lost all graphics, my OS now is only a clock, mozilla and a command shell. that's all i have.
I was hopping to log as root, find the bashrc folder--right click, edit...whatever. Now it's kind of impossible!!
Obviously i tried (first thing) sudo vi/.../bashrc impossible


Any ideas?? Anyone??

Filipe

PS:It seems and it was a trully newbie mistake.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

made mistakes on bashrc-->think i corrupted my OS seriously

Post by gerald_clark » 2011/05/25 13:24:34

Please do not double post.

Just use complete paths until you have it repaired.
/bin/vi

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: made mistakes on bashrc-->think i corrupted my OS seriously

Post by pschaff » 2011/05/25 13:47:29

Apparently you edited the system file /etc/bashrc - is that correct? It is generally preferable to edit the user's ~/.bashrc - water over the dam now. You should be able to correct the damage if you can edit the file using full paths as Gerald suggested.

It does not sound like "lost all graphics" is accurate. You apparently have a GUI login but your environment is corrupted. Have you tried logging in on a virtual console (using Ctrl-Alt-F1) as root?

fgoncalo
Posts: 16
Joined: 2011/05/15 22:31:20

Re: made mistakes on bashrc-->think i corrupted my OS seriously

Post by fgoncalo » 2011/05/25 14:30:48

Yes i have a GUI :) as i said, iam a complete newbie on this.
but i'm making an huge effort on this, i really want to (and i totally have to) learn.

I follow the tip, went ok.
And the problem was, because i've edited the bashrc file, i just entered as root, got into the directory and erased all the changes (a bunch of environment variables ) so now i am reading about them, and trying to understand how to deal with them.

Thank you very much :)
Cheers from Portugal
Filipe

fgoncalo
Posts: 16
Joined: 2011/05/15 22:31:20

Re: made mistakes on bashrc-->think i corrupted my OS seriously

Post by fgoncalo » 2011/05/25 14:35:58

Sorry for double posting :s
I've done as you said, and it went smoothly

Thank you very much, i really hope that one day i can help others with silly questions such as mine :)

Cheers
Filipe

fgoncalo
Posts: 16
Joined: 2011/05/15 22:31:20

Re: made mistakes on bashrc-->think i corrupted my OS seriously

Post by fgoncalo » 2011/05/25 14:36:11

Sorry for double posting :s
I've done as you said, and it went smoothly

Thank you very much, i really hope that one day i can help others with silly questions such as mine :)

Cheers
Filipe

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: [SOLVED] made mistakes on bashrc-->think i corrupted my OS seriously

Post by pschaff » 2011/05/25 20:18:30

Guess this makes quadruple-posting - double squared. :-) Apparently you didn't think the first one took.

Thank you for reporting back. Marking this thread [SOLVED] for posterity, and please do stick around and pass on the benefits of your learning experiences.

P.S. Please consider filling in the From: field in your profile with Portugal or some other indication of your geographic area.

Post Reply