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 recently noticed upon exiting from root in a bash shell (i.e., "exit" after "su -") that I got an error "-bash: clear: command not found"
I couldn't figure out why this was happening, so I tried entering "clear" in a command prompt window, both as a user and as root. In both cases, I noticed that neither "clear" nor "reset" works in bash, and neither binary can be found on my filesystem. How did this happen? How do I fix it?
There is no need to post the same question in more than one thread. I am not sure what could have caused your problem (it could be anything e.g. a security breach or someone accidentally deleted the commands). Try reinstalling the coreutils package.
I recently noticed upon exiting from root in a bash shell (i.e., "exit" after "su -") that I got an error "-bash: clear: command not found"
I couldn't figure out why this was happening, so I tried entering "clear" in a command prompt window, both as a user and as root. In both cases, I noticed that neither "clear" nor "reset" works in bash, and neither binary can be found on my filesystem. How did this happen? How do I fix it?
I'm using FC4, kernel 2.6.16-1.2111_FC4.
Both clear and reset are included in the package named "ncurses-5.4-19.fc4" on my FC4 machine. I would suggest that you make sure you have that package installed on your machine.
Apologies for posting my query in separate forums. Being a newbie here and a veteran of Usenet (where crossposting is a tradition), I did not realize this was against the rules.
Yes, it was an ncurses issue. It's a long story but here is the gist: In order to solve a dependency issue on a particular software package (rpm), I needed to install a particular file (libtinfo.so.5) which is supposed to be part of ncurses but which Feodra's RPM version of ncurses did not include. So I searched and found a non-rpm version of ncurses that included libtinfo.so.5, and unpacked, compiled and installed it (without first uninstalling the RPM version). However, I still couldn't get the other rpm installed (it still reported a dependency problem), so I gave up on it. I then did make uninstall on the ncurses version I had installed.
When I understood that my clear and reset problems might have been caused by my ncurses installation/uninstallation, I checked to see if the old ncurses rpm was still installed. rpm -q showed that it was, and it did not occur to me that the rpm database would still list ncurses as installed even if I had inadvertantly deleted some of the files it had installed.
After reading your posting, I downloaded the ncurses rpm (same version I already had) and reinstalled it using --force. That did the trick.
Thanks for your quick response, and I apologize once again for the duplicate posting.
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.