0

I was in the process of installing SML on my personal laptop, and I modified the path file. Now, all of the basic commands don't work. i.e) -bash: ls: command not found

How do I reset everything?

  • Which "path file" ? What is its own path ? May be could you could first `PATH=/bin:/sbin:/usr/bin:/usr/sbin` ? – Laurent G Mar 02 '17 at 22:02
  • 2
    Duplicate of [Need to recover older $PATH setting](http://stackoverflow.com/questions/7956365/need-to-recover-older-path-setting). Also, this problem is quite unrelated to Standard ML. :) – sshine Mar 02 '17 at 23:10
  • @SimonShine That other question seems to be about Windows whereas this one seems to be about Linux. But -- you are of course right that it really has nothing to do with ML. – John Coleman Mar 03 '17 at 01:13
  • 1
    Ah yes, you're right. It's a duplicate of [Linux wrong path exported. How to recover ~./bashrc file](http://stackoverflow.com/questions/5361937/linux-wrong-path-exported-how-to-recover-bashrc-file) then. :-P – sshine Mar 03 '17 at 02:19
  • 1
    Possible duplicate of [Linux wrong path exported. How to recover ~./bashrc file](http://stackoverflow.com/questions/5361937/linux-wrong-path-exported-how-to-recover-bashrc-file) – John Coleman Mar 03 '17 at 02:27

2 Answers2

0

I think that the better option is to reboot with live distro, mount your root file system, revert the change to the path file and than reboot your system

Gianluca
  • 3,227
  • 2
  • 34
  • 35
  • That sounds completely overkill. Presumably the PATH variable was messed up either in the immediate shell (in which case a new terminal can simply be opened), or in ~/.bashrc, in which case a non-bash shell (e.g. sh) can be opened in order to fix that file. Either way, this question was asked and answered multiple times before. – sshine Mar 03 '17 at 02:23
-1

Try to create environment for your new path or change your directory cd <new path> to new path.

Follow this url to create environment

Maveňツ
  • 1
  • 12
  • 50
  • 89