Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to check all the commands executed in a Linux server?

Answer:

The short answer is no.

But it might be possible by looking at the .bash_history under the user folder, but keep in mind that user can clear their history by using "history -c" command, or they can delete the file manually.

If you want to force logging on all user, what you need is called "process accounting".

See a more comprehensive howto: http://tldp.org/HOWTO/Process-Accounting/

  1. Search the history of commands you have executed
  2. Check how long server has been running
  3. List 10 most often used commands
  4. How to avoid saving current shell session history
  5. How can I clear the command history in Linux?

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>