LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-07-2006, 07:58 AM   #1
hilljockey
LQ Newbie
 
Registered: Jun 2006
Posts: 10

Rep: Reputation: 0
.bashrc


I've added a path line to /root/.bashsrc

Now most commands are "not found" because of this.

Importantly I can't run vi to undo the file edit.

No user has sudo permission.

Not using a GUI. Any suggestions about how to fix this?
 
Old 06-07-2006, 08:04 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You can run vi by including the whole path. I.e.:

/usr/bin/vi

Your path to vi could be different (use which vi to find out).

Hope this helps.
 
Old 06-07-2006, 08:10 AM   #3
hilljockey
LQ Newbie
 
Registered: Jun 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Druuna, that worked a treat!
 
Old 06-07-2006, 08:22 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by hilljockey
I've added a path line to /root/.bashsrc
You shouldn't do this, in general.
The path modification should be done in .bash_profile
Otherwise, every script that you run from bash (this is a bash feature only, it doesn't care about the #!/bin/sh line) will inherit this property, maybe twice.
Basic example is PATH=/some/dir:$PATH in .bashrc.
If a script spawn 3 children then the path will become /some/dir:/some/dir:/some/dir:$PATH.
Also there should be no EXPORT command in .bashrc.

Last edited by nx5000; 06-07-2006 at 08:24 AM.
 
Old 06-07-2006, 08:35 AM   #5
hilljockey
LQ Newbie
 
Registered: Jun 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for that tip. I was unsure about what to do and really not wanting to touch .bashrc again!
 
Old 06-07-2006, 01:11 PM   #6
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Mostly, you'll just use your .bashrc for adding aliases.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where is bashrc ? Kanaflloric Slackware 12 10-06-2007 02:47 PM
.bashrc ? Longinus Linux - Newbie 2 03-27-2004 11:50 AM
.bashrc roofy Slackware 7 05-06-2003 01:32 PM
bashrc nobu Slackware 6 03-21-2003 10:53 AM
.bashrc prasad Linux - General 1 04-14-2001 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration