LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2005, 08:37 PM   #1
marioV
LQ Newbie
 
Registered: Oct 2005
Location: Guadalajara Mexico
Posts: 9

Rep: Reputation: 0
bash defaults


Hi well I was teaching myself Bash and then I kinda got in trouble, I tried to add a new directory to my PATH and ended up deleting it, so now i have no ls nor chmod nor dir or anything like it, and i really dont know what the default are so if anyone could help

thanks
MARIOV
 
Old 11-16-2005, 09:56 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Edit the file /etc/ld.so.conf to add the directories you want in the path for all users. Then open a term window and issue the command 'source /etc/ld.so.conf' to reload that basic path.

If you want any other directories just in the user's PATH, use the PATH=$PATH;<any other directories here> and export PATH to add them just to the user's PATH.
 
Old 11-16-2005, 10:13 PM   #3
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 bigrigdriver
Edit the file /etc/ld.so.conf to add the directories you want in
the path for all users. Then open a term window and issue the
command 'source /etc/ld.so.conf' to reload that basic path.

If you want any other directories just in the user's PATH, use
the PATH=$PATH;<any other directories here> and export PATH
to add them just to the user's PATH.
Dude ... ld.so.conf STILL hasn't got ANYTHING to do with the
path to any executable ...
http://www.linuxquestions.org/questi...27#post1890027


Neither has it got anything to do with bash-scripting, you
CAN'T source the file (well, you can if you like error-messages
and don't care about any positive results).


Quote:
I tried to add a new directory to my PATH and ended up deleting it, so now i have no ls nor chmod nor dir or anything like it, and i really dont know what the default are so if anyone could help
Where did you do that adding bit, in which file? Or was it just on
the command-line, like in
export PATH=$PATH:/new/path
?




Cheers,
Tink
 
Old 11-16-2005, 10:31 PM   #4
marioV
LQ Newbie
 
Registered: Oct 2005
Location: Guadalajara Mexico
Posts: 9

Original Poster
Rep: Reputation: 0
the problem was that instead of using export PATH=$PATH:/directory
i used export PATH=PATH$:/directory so my path ended up to be:

PATH$

instead of the directories of the shell utilities
 
Old 11-16-2005, 11:06 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Blog Entries: 4

Rep: Reputation: 78
Well, if you didn't edit any files with your path, you should be able to:
$ source /etc/profile
to get you basic path back.

PS: you can still run commands by using the full path, ie: /sbin/chmod instead of just chmod.
 
  


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
kamix defaults SCOSWriter Linux - Software 1 05-31-2005 03:26 PM
Defaults? aethiolas Linux - Newbie 2 12-21-2004 06:31 AM
Grub defaults TazLinux Linux - Hardware 1 11-24-2004 07:38 PM
Restoring to defaults Superganja23 Red Hat 7 11-14-2004 03:23 PM
Defaults Lostman Linux - Newbie 5 11-04-2003 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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