Since updating to Big Sur, the history
command (terminal) shows only the last 16 commands. Do you have any ideas how to get the full history back?
4 Answers
I'm assuming that your shell is zsh
, you can view your whole history by using the following command-
history 0
I am meeting this issue as well. It seems since recent updates the history
command is set up to show only a bunch from the most recent entries, instead of the whole command history as it were. I can't seem to get help by RTFM or various attempted commands such as -h
--help
etc.
This is impractical for me, I would like to search the whole history using grep
.
In the meantime a workaround is to cat ~/.zsh_history
echo 'alias history="history 1"' >> ~/.zshrc && source ~/.zshrc && history
-
1
If you want to configure your history command to display full command History and everything since the start then follow these steps (assuming you have zsh
shell):
Open your Terminal.
Make an alias of history to show since the first command, type:
echo 'alias history="history 1"' >> ~/.zshrc
Source your configuration file by typing:
source ~/.zshrc
Now finally type:
history
-
This is a duplicate of an existing answer to the same question apple.stackexchange.com/a/463490/221742 albeit split up. Can you explain why your solution is any different? It would have been of more benefit to edit the existing answer and add in the explanation steps. Commented Nov 26, 2023 at 8:35