LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 09: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 02:25 AM.
 
Old 10-01-2012, 10:05 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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, 10: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, 11:57 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:17 AM.

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