-1

I was starting to type the command export PATH=/newPathAddition:$PATH I think I must have copied in a newline when copying the newPathAddition to paste into the command, because it ran export PATH=/newPathAddition. I know I can manually add things to the path variable, but is there any way to restore it to what it used to be, or find out information about which directories were in the path beforehand? I really don't want to be in a situation in the future where all these commands aren't working on my computer because things vanished from the path that I don't remember.

4

1 回答 1

1

这些更改在这一命令提示符下是本地的。只需打开另一个终端窗口。

如果您需要在此特定终端窗口中使用的正常值$PATH,请打开另一个并复制其$PATH值。

如果您希望更改保持不变,您需要使用您希望使用的 -altering 命令在您的主文件夹中$PATH写入一个.bashrc文件或文件。要恢复,请将它们取出。.profile$PATH

于 2013-06-27T19:18:58.227 回答