LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2012, 10:43 AM   #1
googlez
LQ Newbie
 
Registered: Jul 2009
Posts: 13

Rep: Reputation: 0
source .bashrc makes command windows fails, how to fix it?


I use Fedora 17, I add a line to .bashrc: "PATH=/usr/local/opt/intel" .
Then I use #source .bashrc .
I got many error mesage "tty .........".

When I use command #ls to list directory and files.
I got the message: commang not found, similar commands are 'lc' 'lz' .

What can I do to fix this error?

please help, Thanks.

Last edited by googlez; 10-02-2012 at 03:25 AM.
 
Old 10-01-2012, 11:05 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,253

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
The PATH variable is searched when looking to find out what commands a user can use. As you have now set your path to only a single directory, which of course does not house such commands as ls,
they are no longer able to be used.

If your intention is to append this to your path so you have more than the standard locations, you must include the original PATH variable as well.
Something like:
Code:
PATH=$PATH:/usr/local/opt/intel
 
2 members found this post helpful.
Old 10-01-2012, 11:34 AM   #3
googlez
LQ Newbie
 
Registered: Jul 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by grail View Post
The PATH variable is searched when looking to find out what commands a user can use. As you have now set your path to only a single directory, which of course does not house such commands as ls,
they are no longer able to be used.

If your intention is to append this to your path so you have more than the standard locations, you must include the original PATH variable as well.
Something like:
Code:
PATH=$PATH:/usr/local/opt/intel
But in my .bashrc, there is no other path, I will post it when i come to my office tomorrow.
the only path is what i have added. the problem right now lies in that I can't use almost all commands in command windows, such as: ls, vi, shutdown etc. etc.
 
Old 10-01-2012, 12:57 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,253

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
You misunderstand. PATH is a global variable set by your system administrator. You are able to alter it though via your own personal .bashrc file (hence why it affects only you).
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] problem in source the bashrc saeedian Linux - Software 11 01-04-2012 04:40 AM
Using Screen command/feature. How to fix windows scrolling wireless_ Linux - Software 1 05-07-2010 09:06 AM
gnome: Fedora/CentOS source .bash_profile but Ubuntu/Debian source .bashrc centguy Linux - Software 6 01-17-2010 09:35 PM
bash's source command doesn't work with .bashrc crs_zxf Linux - Newbie 18 03-07-2009 03:25 AM
yum, firefox, ATI drivers, bashrc, perl/Tk, Logitech keyboard, etc - lots to fix!!!! Nalorin Linux - Software 9 06-23-2005 01:45 AM


All times are GMT -5. The time now is 01:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration