LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PATH problems.. please help (https://www.linuxquestions.org/questions/linux-newbie-8/path-problems-please-help-105304/)

n3wb1e 10-17-2003 05:18 PM

PATH problems.. please help
 
Hello

I have big problem

I was playing with PATHs.. i just type PATH= in shell
But now.. dont work any PATH because when i type ps, ls and other commands.. linux cant find them.. i must ruin them in /bin

for example

[root@localhost etc] ls
-bash: ls: No such file or directory

How can i fix that? how can i edit PATHs anyway?

PLEASE HELP ME!!

thank you very much!!!

jqcaducifer 10-17-2003 05:27 PM

type

PATH="/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin"

and you'll get it back.

hussar 10-17-2003 05:28 PM

What is the output of the command '/usrbin/echo $PATH'?

It sounds to me like you may have altered your $PATH variable value in such a way that it now points to nothing. Unless you altered one of your login files (.login, .bashrc, .profile, etc.), this should fix itself if you log out and then log back in.

To edit your path to include a bin directory in your /home directory for example, you would enter the command 'PATH=$PATH:/home/yourlogin/bin'

If this doesn't work for you, let us know.

hussar 10-17-2003 05:29 PM

Uh, that should have been "/usr/bin/echo $PATH" Sorry.

Skyline 10-17-2003 10:15 PM

Quote:

how can i edit PATHs anyway?
For example: to add /home/paul/programs to your PATH

PATH=$PATH:/home/paul/programs

export PATH

and to check PATH's

echo $PATH


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