LinuxQuestions.org
Visit Jeremy's Blog.
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


Closed Thread
  Search this Thread
Old 07-20-2010, 12:49 AM   #1
msbernice
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
Post linux questions and ANSWERS PLEASE!


Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?
 
Old 07-20-2010, 12:59 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Smacks of homework ... did you read the accompanying course
material? What steps did you take (other than asking others)
to come up with a solution?



Cheers,
Tink
 
0 members found this post helpful.
Old 07-20-2010, 01:07 AM   #3
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Rep: Reputation: 17
PATH is a variable that tells your shell which directories to search for your programs from your commands that you have typed in and if you delete it then you will have quite a headache..
 
Old 07-20-2010, 01:17 AM   #4
leopoldb
LQ Newbie
 
Registered: Jul 2010
Location: Nacka, Sweden
Distribution: OpenSuSe 11.3, Ubuntu 10.04 LTS, XP
Posts: 29

Rep: Reputation: 15
Smile How about re-install?

Quote:
Originally Posted by msbernice View Post
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?
Hello,
My first thought is re-install. Save your data and re-install your system.

//Leopold
 
0 members found this post helpful.
Old 07-20-2010, 01:20 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by leopoldb View Post
Hello,
My first thought is re-install. Save your data and re-install your system.

//Leopold
While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...


Cheers,
Tink
 
1 members found this post helpful.
Old 07-20-2010, 04:36 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by msbernice View Post
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?
Weird homework question because you can't delete a variable; you can unset it and you can set it to a null value but you can't delete it.
 
Old 07-20-2010, 05:07 AM   #7
leopoldb
LQ Newbie
 
Registered: Jul 2010
Location: Nacka, Sweden
Distribution: OpenSuSe 11.3, Ubuntu 10.04 LTS, XP
Posts: 29

Rep: Reputation: 15
Smile Clearing out a misunderstand

Quote:
Originally Posted by Tinkster View Post
While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...


Cheers,
Tink
Hello Tink,

I am sorry that you misunderstand my intention. I had no intention of mocking the person whom is seeking help here. I was helping as I would do if I would to come up with the same problem.

As the question was, it was a one time problem with, in my mind, the easiest solution is re-installing the system. I have done so many times when I think I missed something in my system. Searching for a solution is time consuming and re-install is easy and pretty much self-going.

//Leopold
 
Old 07-20-2010, 09:19 AM   #8
BirdRacer
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Rep: Reputation: 2
Umm....why not set the variable back to something reasonable like:

Code:
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/bin ; export PATH
Then, as issues arise such as getting messages like "command not found", then find the path to that particular command and add it to the $PATH with :

Code:
PATH=$PATH:/path/to/new/command ; export PATH
You will need to add this to your .bash_profile or /etc/profile, and edit it each time you make changes to make it permanent.
 
Old 07-20-2010, 09:40 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
@leopoldb
Although I haven't tried it, to my knowledge a reboot should do the trick to get it back. It should be my option before re-installing
 
1 members found this post helpful.
Old 07-20-2010, 09:50 AM   #10
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by Tinkster View Post
While this is mildly entertaining it's not really
in the spirit of LQ to mock people asking for help...
Some thoughts on this.

This is clearly a homework question.
The OP did not even rephrase the question, it is copied verbatim from the text book.
The title of the thread is badly chosen, not related to the question.
The OP DEMANDS an answer: linux questions and ANSWERS PLEASE!

I think with all this shown disrespect for LQ and its members, the answer by leopoldb was midly entertaining and completely justified. Don't forget that the OP does not really have this problem, it is a text book question, and I doubt whether the OP has ever be close to a Linux machine.

Sorry for being pedantic

jlinkels
 
Old 07-20-2010, 10:26 AM   #11
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by jlinkels View Post
Some thoughts on this.

This is clearly a homework question.
The OP did not even rephrase the question, it is copied verbatim from the text book.
The title of the thread is badly chosen, not related to the question.
The OP DEMANDS an answer: linux questions and ANSWERS PLEASE!

I think with all this shown disrespect for LQ and its members, the answer by leopoldb was midly entertaining and completely justified. Don't forget that the OP does not really have this problem, it is a text book question, and I doubt whether the OP has ever be close to a Linux machine.

Sorry for being pedantic

jlinkels
completely true.

and I believe this thread should be closed, and the OP warned about not posting homework questions - at least, without making its own studying first.
 
Old 07-20-2010, 10:46 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by jlinkels View Post
the answer by leopoldb was midly entertaining and completely justified.
Entertaining yes, completely justified no. While posts in this thread are read in context right now it might also be read later on by others and a novice might take that misinformation seriously. While all are responsible for their own actions that doesn't mean 'rm -f' and equivalent jokes do LQ or GNU/Linux users in general any good.
 
1 members found this post helpful.
Old 07-20-2010, 10:47 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by leopoldb View Post
I was helping as I would do if I would to come up with the same problem.
Then I strongly suggest you use GNU/Linux a lot more before giving any "advice".
 
Old 07-20-2010, 01:13 PM   #14
leopoldb
LQ Newbie
 
Registered: Jul 2010
Location: Nacka, Sweden
Distribution: OpenSuSe 11.3, Ubuntu 10.04 LTS, XP
Posts: 29

Rep: Reputation: 15
Red face I stand corrected

Quote:
Originally Posted by Wim Sturkenboom View Post
@leopoldb
Although I haven't tried it, to my knowledge a reboot should do the trick to get it back. It should be my option before re-installing
Hello Wim S.,
Yes, of course. I assumed that OP had tried that before he post here. But you are right and I stand corrected.

Remember all newbie out there, if a problem comes along, reboot your system!

//Leopold

Last edited by leopoldb; 07-20-2010 at 01:19 PM. Reason: Typo
 
Old 07-20-2010, 01:19 PM   #15
leopoldb
LQ Newbie
 
Registered: Jul 2010
Location: Nacka, Sweden
Distribution: OpenSuSe 11.3, Ubuntu 10.04 LTS, XP
Posts: 29

Rep: Reputation: 15
Question I do not understand

Quote:
Originally Posted by unSpawn View Post
Then I strongly suggest you use GNU/Linux a lot more before giving any "advice".
Hello unSpawn,

I do not understand what you mean. Can you please elaborate what you mean?

//Leopold

Last edited by leopoldb; 07-20-2010 at 01:21 PM. Reason: Blue smile seemed angry - changed to a more happy one
 
  


Closed Thread

Tags
homework, school



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
Taranaki Linux questions and answers cctv Linux User Groups (LUG) 1 03-14-2009 06:43 AM
some linux interview questions pls post me answers shanthikumari Linux - General 4 06-14-2008 08:39 AM
Community interview: Novell answers 10 questions about Linux, GPLv3, ODF, and more marozsas Linux - News 0 09-27-2007 12:06 PM

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

All times are GMT -5. The time now is 02:16 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