Skip to content

WSL command history location? #12241

Closed
Closed

Description

Had a query with regards to locating the WSL command history file, similar to how Bash and PowerShell entries can be found at %USERPROFILE%\.bash_history and %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt respectively. My configs are as follows:

> wsl -v
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5011
> wsl -l
Windows Subsystem for Linux Distributions:
docker-desktop (Default)

history lists previously used commands in the following format:

:/mnt/host/c/WINDOWS/system32# history
   0 cat
   1 exit
   2 help
   3 history
   ...

I've surfed over the official WSL docs and net in general but to no avail. Also skimmed through and searched for issues to see whether the same question was already asked or mention has been made about it being stored within the Docker volume directories (\\wsl$\docker-desktop\...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions