Bash commands not found

Unix & Linux Asked by Yuseferi on November 26, 2020

I use CentOS 7 and I install anaconda and some tools, after that some basic command like clear which not work.

[zhilevan@localhost ~]$ clear
bash: clear: command not found...

when I echo $PATH I see below results

[zhilevan@localhost ~]$ echo $PATH

Also, when I try to sudo yum install which but It says already installed.

Also I try export PATH=$PATH:/bin:/usr/local/bin but not correct.

where is the problem and how can I solve this problem?

3 Answers

It looks as though some of your commands have been modified/removed outside of yum.

You need to reinstall the missing commands like so:

yum reinstall which

You can give multiple packages as you identify them:

yum reinstall which clear

If you find that lots of commands have been removed, it may be easier to reinstall your whole system.

Correct answer by forquare on November 26, 2020

yum install ncurses


dnf install ncurses

clear command should then be available

Answered by uxking on November 26, 2020

I would try to search for the missing command by its name.

find / -name which

Assuming 'which' is the missing command, then you can add it to you PATH.

Answered by Laith Leo Alobaidy on November 26, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP