Jump to content
4 posts in this topic

Recommended Posts

Hello,

 

i tried searching but didn't found any answer to my problem.

 

I recently added the "/usr/X11R6/bin/X" to the path in that profile file under "/etc/"

to get xinit started.

 

That worked but after a reboot i lost the access to any commands

and can't undo the editings of that profile file because it doesn't let me open PICO through

the prompt complaining that it can't find any command.

 

An echo $PATH prints out the /usr/X11R6/bin/X path.

 

What can i do to regain access to the commands. Should be more simple than reinstall, right ?

 

Phil

Link to comment
https://www.insanelymac.com/forum/topic/64550-cant-find-any-command/
Share on other sites

Hi Phil,

 

You've either made a syntax error or completly deleted the path to other commands..

 

Try this...

 

- Open Terminal

sudo -s

(password)

/usr/bin/nano /etc/profile

 

(My PATH line looks like this)

 

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

ctrl x

yes

(leave filename as profile)

 

reboot

 

 

if that works fine and you want to add the additional search path try this:

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

 

Hope it works!

No lollett,

 

it just keeps complaining that it can't find any commands. the -cd command is working but the -ls is not for example. I just need to get to open that PICO editor again to set the default paths.

 

:D

 

 

Edit: Ok, just did a reinstall, was actually quite fast.

Hi again Phil...

 

Did you actuall try what I suggested above???

 

The fact your echo $PATH statment only showed /usr/X11R6/bin/X means the shell wasn't looking in other folders for commands your looking for such is ls,pico/nano etc!

 

the ls command is located in /bin so without the path you would have had to type

/bin/ls

 

simular pico is located in /usr/bin so you'd have had to type /usr/bin/pico

 

the cd command is built into the shell so it doesn't need a path to run it.

×
×
  • Create New...