LinuxQuestions.org
Review your favorite Linux distribution.
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 06-05-2008, 04:21 PM   #1
shamiksaha
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
changed the value of PATH variable


I accidentally changed the value of the PATH variable while working on my fedora 7 ,accessing through the root account,as a result I cannot access the root account and the majority of the commands are not found ,even when I logged in from other account and switched to su.I need to get back to root.
Thanks in advance
Shamik Saha
 
Old 06-05-2008, 04:41 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,346

Rep: Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910
Logging out and logging back in will reset all of your environment variables (usually).

If you're using BASH, you can do this:

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:./
export PATH

And that should give you all your commands back. Chances are your PATH variable is set to null, so it can't find anything.
 
  


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
Path Variable answerme Linux - Newbie 6 04-19-2008 03:35 AM
Path changed, I cant find where the problem is kramed Fedora 3 03-27-2008 02:25 PM
PATH variable suavecu Linux - Software 11 01-28-2006 01:44 AM
path of mailbox in sendmail can be changed or not dhanju Linux - Networking 1 09-28-2005 10:17 AM
$path variable ? moby Linux - Newbie 3 06-01-2004 04:18 PM


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