Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code - Where is the terminal history saved?

I noticed that the command history is saved when using Visual Studio Code. Using the arrow up and down keys, I can toggle through previously issued commands in the integrated terminal.

Where is the terminal history saved on the drive? Is it possible to open a file in notepad (or notepad++) and investigate the complete history, delete it?

I'm using Windows 10, and I have concluded that deleting the folders C:\Users\john\.vscode and C:\Users\john\AppData\Roaming\Code will not delete the terminal history for a particular project.

like image 922
John Avatar asked Dec 07 '19 08:12

John


People also ask

How do I find my terminal history?

Ctrl+R to search and other terminal history tricks.

How do I go back in Visual Studio code terminal?

Select a symbol then type F12. Alternatively, you can use the context menu or Ctrl+click (Cmd+click on macOS). You can go back to your previous location with the Go > Back command or Ctrl+Alt+-.


2 Answers

VSCode terminal use external shell. For linux the default shell is bash, I am not so sure about window, but I guess the default shell for window is powershell.

If your terminal shell is indeed powershell, this should help you locate the log file.

like image 145
Wan Chap Avatar answered Sep 26 '22 09:09

Wan Chap


On Ubuntu you can see your history using this command:

vi ~/.bash_history
like image 39
Parikshit Singh Avatar answered Sep 25 '22 09:09

Parikshit Singh