How to Clear Terminal in VS Code

Don't like the cluttered terminal screen in VS Code? Here's how to clear it with a keyboard shortcut.
Warp Terminal

Like any other modern code editor, the VS Code has an integrated terminal that is generally used to showcase the output of a code.

But how are you supposed to clear the terminal?

Well, the easiest (tested on Windows and Linux) is to hover the cursor over the terminal and use the Ctrl + l to clear the terminal.

Alternatively, you can use the Ctrl + ` to get into the terminal window:

clear terminal in VS Code

That works but takes a bit longer. What if you want to use any other shortcut? In this tutorial, I will show you how to do that.

Clear the terminal in VS Code

Here, I will walk you through step by step how you can allocate a specific shortcut to clear the terminal in VS Code.

First, press Ctrl + Shift + p and it will bring you the command editor:

command editor in VS Code

Here, you will have to search for clear command for the terminal by typing the following in the command editor:

Terminal: Clear

And click on the little gear icon for the first result:

Find clear terminal shortcut in VS Code

Here, click on the plus + icon and it will ask you to create a shortcut to clear the terminal. You may use various options, but in case, I went with Ctlr + Alt + l as it was not occupied by any other operation:

Create a show

Once done, press the Enter key to confirm the shortcut and that's it!

From now on, you don't have to switch to the terminal window to clear the terminal:

Clear the VS Code terminal using shortcut

Pretty cool. Isn't it?

Looking for more VS Code shortcuts?

Shortcuts give you a superpower. Mastering correct shortcuts makes you more efficient and helps you become more productive.

Here are a list of best VS Code shortcuts you should know and master.

15 Best VS Code Keyboard Shortcuts to Increase Productivity
Do you want to be highly productive? Get familiar and memorize these VS Code keyboard shortcuts for Linux, Windows, and macOS.

By the way, have you heard of VSCodium, a complete open source version of VS Code?

VSCodium: 100% Open Source Version of Microsoft VS Code
Brief: VSCodium is a clone of Microsoft’s popular Visual Studio Code editor. It’s identical to VS Code with the single biggest difference that unlike VS Code, VSCodium doesn’t track your usage data. Microsoft’s Visual Studio Code is an excellent editor not only for web developers but

I hope you will find this helpful. And if you have any queries, feel free to ask in the comments.

About the author
Sagar Sharma

Sagar Sharma

A software engineer who loves to write about his experience with Linux. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.

It's FOSS

Making You a Better Linux User

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.