How to clear the screen
Overview
Clearing removes visible output so the terminal is easier to read. It does not undo commands, delete data, or change your working directory.
Commands and shortcuts
Run clear, or press Ctrl+L in Bash and many other shells.
clear
What remains
Shell variables, background jobs, and the current directory remain unchanged. Many terminal applications also keep earlier output in scrollback.
resetcan repair a terminal whose display has become garbledhistorystill shows previous commands after clearing
Tips
Save important output before clearing by redirecting it to a file or using tee. Re-run a harmless information command if you need its output again.