开发者

nuked my centos path settings

i, by mistak开发者_高级运维e, nuked my centos path settings by adding a wrong path. i added the following :

PATH=/usr/local/jdk1.6.0/bin
export PATH

to /etc/profile/bashrc and now all the commands are gone.

could someone please help me restore my system.

thanks in advance.


One way of setting your path without breaking it is:

export PATH=/usr/local/jdk1.6.0/bin:$PATH

A short explanation. When you want to add something new to your path, you should keep the old path settings. What you did was to set the path to point only to /usr/local/jdk1.6.0/bin. That's why all the other commands except from the ones found in /usr/local/jdk1.6.0/bin are "gone". Nothing is really "gone". You just need to reset your path. Just open a new shell/terminal instance or simply logout/login and set your path using a more proper way.


export PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜