How can I clear a terminal screen after my user has selected an option from my application's menu?
You can use Ctrl+L keyboard shortcut in Linux to clear the screen. It works in most terminal emulators.
When using the bash shell, you can also clear the screen by pressing Ctrl + L .
We can use the “ESC c” console code to clear the terminal screen. The ASCII value of the escape character is decimal 27.
:! run the shell command
:! cls under windows
:! clear under linux and OS X
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With