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.

[[email protected] ~]$ clear
bash: clear: command not found...

when I echo $PATH I see below results

[[email protected] ~]$ 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!

Related Questions

Viewing (monitoring) line status of a serial port

1  Asked on February 4, 2021 by anton-samsonov


How to list files – sorted by both filename and modified date?

1  Asked on February 3, 2021 by gabor-faludi


Specify rootfs mount options

1  Asked on February 3, 2021 by iron-oxidizer


PulseAudio module-remap-source blocks shutdown

0  Asked on February 2, 2021 by konrad-hffner


Gedit doesn’t work in Kali 2020

0  Asked on February 1, 2021 by mate-mre


Trying to Install Linux Alongside Windows 10

2  Asked on January 30, 2021 by jackson-a-cubbage


EasyTether Internet Disconnect on OpenWRT Router

0  Asked on January 30, 2021 by jack-nelson


Issues installing Nvidia drivers in Debian 9

1  Asked on January 29, 2021 by axiomsword


Ask a Question

Get help from others!

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