cancel
Showing results for 
Search instead for 
Did you mean: 
  • 833 Views

History command not showing all the Entries

Why the termimial not showing all the history. i am running as a root user.
is it possible to see other users bash history?

3 Replies
Trevor
Starfighter Starfighter
Starfighter
  • 796 Views

When you say that the "history" command is not showing all the history, do you mean that you're not seeing all the history for the root user?

Trevor "Red Hat Evangelist" Chandler
Chetan_Tiwary_
Community Manager
Community Manager
  • 756 Views

@suthakar_sush you probably ran the commands with another user eg. student , hence root user session cannot list those commands. 

You can however switch to student user and see the history or use .bash_history file.

or you can copy the student user's bash_history file as root user to root user directory and see the history ( provided the user has not overwrite any other location for .bash_history file ).

Chetan_Tiwary__0-1722198526804.png

 

DavidOBrien
Starfighter Starfighter
Starfighter
  • 745 Views

Another thing to consider is if you have two root terminals open then you'll only see the history of commands for the individual sessions. If you close one of the sessions then its command history is written to the history file, and is visible to the other session.

Join the discussion
You must log in to join this conversation.