Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was setting up my classpath and path for java, and all was going well, untill....
I looked a page from my instructor on how to set up the Paths and the .bashrc and .bash_profile files were diffrent than mine. Being the *genius* I am, I re-did mine to like like his, make corrections for path names. When I tried to do an ls, command not found. can'd do anything now. What can I do?
Any help would be nice. I don't want to re-install again for this. I tried re-installing a shell that was on the disk, but nothing. I'm a newbie, as you can tell. I'm running Mandy 9.0 by the way.
Well you can create another user as root and copy this user's files over, it will leave you pretty much at defaults, I assumed you screwed up users files not system wide files such as /etc/profile, right??? Or you can use the absolute path to the commands and programms, or you can edit the PATH again. Again I assumed you put something like this in your user's dot file (be it .bash_profile for instance) -
PATH=/path/to/java/for/instance
export $PATH
you just nulled out all the path defined system wide to /path/to/java/for/instance, what you needed to do was
PATH=$PATH:/path/to/java/for/instance
export $PATH
A few tips: if opt for copying other users files do it as root and don't forget to change ownership to your hurt user, I'd strongly suggest using adduser command line tool to create user account, and you can delete the unwanted afterwards user with userdel, and to become root from console use
/bin/su -
a dash there on porpuse, it'll load root's environment, but I guess you already know it by heart, right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.