On Sat, Aug 28, 2010 at 09:33, NAGAMOHAN YENUGANTI <[email protected]>wrote:
> > > On Sat, Aug 28, 2010 at 6:07 AM, Abhinandan Kothari < > [email protected]> wrote: > >> i was configuring java on my ubuntu and by mistake i saved wrong path and >> now its giving error if i am typing ny command in terminal ls, sudo , cp , >> mv anything. >> >> >> -------------------------------------------------------------------------------------------- >> a...@abhi-laptop:~$ ls >> Command 'ls' is available in '/bin/ls' >> The command could not be located because '/bin' is not included in the >> PATH environment variable. >> ls: command not found >> >> ------------------------------------------------------------------------------------------------- >> >> this problem is only for user named abhi that is local user , root does >> not have ny problem >> actually i have wrongly edited ~/.bashrc file for user named abhi >> plz help me out , how to restore the file >> -- >> Abhinandan Kothari >> >> -- >> l...@iitd - http://tinyurl.com/ycueutm >> > > The path variable is corrupted. The commands are not getting executed > because the path of binaries is not available. > The commands may be executed by giving absolute path like /bin/ls > The path variable should be like this. > > export PATH= > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:$PATH > > -- > Thanking You > Y.NagaMohan > Integrated Electronics & Circuits ( 2007-09 ) > M.Tech, IIT Delhi > +918050786558 > > -- > l...@iitd - http://tinyurl.com/ycueutm > Log in to the root user and the ~abhi/.bashrc Just change: export $PATH=$JAVA_HOME/bin to export $PATH=$JAVA_HOME/bin:$PATH Also, what guide are you following? Installing java in ubuntu is as simple as apt-get install sun-java6-jdk All configurations including path are done automatically. Regards, Sudarsan -- l...@iitd - http://tinyurl.com/ycueutm
