Search code examples
dockerdocker-composedocker-machine

Get previous command in docker container console


Docker-toolbox is installed on the windows machine. I go into the container, for example: docker exec -it web / bin / sh I can enter commands there.

How to access the history of input commands inside a container? In all consoles, this is done using the up arrow key, here when you press this key, ^ [[A.

How to look at the history or at least call the previous command?


Solution

  • The easier way is to type the command "bash" and then you'll be in bash with previous commands history.