if you're inside docker container using cli trying to modify files and wanna clear yout terminal , you tried ctl + l or clear command but getting response like
bash: clear: command not found
don't worry it's due to container nature, since it always install bare minimum utilities so we can manually install linux utility to work smoothly .
- Find out container os image
bash-5.2# cat /etc/os-release
here in my case Wazuh Manager container is running on Amazon Linux, which is based on Fedora, the package manager to use is dnf.
- now we can install clear utility in you container by following steps
Install util-linux package it contains the clear command
dnf install util-linux -y
or else you can install ncurses
See Clear command will work now .
before
After
keep Learning, Keep Troubleshooting !
Top comments (0)