What is the difference between clear command and history command with c option in linux?
clear command is used to clear the visible terminal screen, just to make the terminal look clean. It did not delete the command history.
history -c command is used to clear the entire command history from the current terminal session. It deletes the list of commands that have been used in that session. It did not clear the screen.
Posted Jul 25, 2025, 11:25 AM UTC
20