How to see the auth.log messages in the terminal?

6,511

You can do what @mikewhatever is telling You. Now, with your next question, and how You can keep using your terminal, what You can do is send the actual process to the background. These are the steps to do it:

  1. tail -F /var/log/auth.log
  2. Ctrl+z
  3. bg 1

Shazam!!! You can keep using your terminal and You will see the output when a new line is coming into the file.

Share:
6,511

Related videos on Youtube

Olivia
Author by

Olivia

Updated on December 03, 2022

Comments

  • Olivia
    Olivia over 1 year

    I would like to find a way to display the information saved in the auth.log file in real time in my terminal (everytime someone tries to connect to my server, I want it to appear in my terminal) without having to open the file manually.

    Thank you !!

    Olivia

    • Admin
      Admin almost 7 years
      How about tail -F /var/log/auth.log?
    • Admin
      Admin almost 7 years
      Thank you, this is a first really nice step but still not exactly what I would like, because then I cannot write command lines anymore when I use tail. I would like to be able to continue working on my terminal and that the log messages appear automaticaly in the same terminal when a new line is added to the log file (a permanent rule)
    • Admin
      Admin over 4 years
      Why not open another terminal window just for the monitor?
  • Admin
    Admin almost 2 years
    Nice! Another way you could do this is "tail -F /var/log/auth.log &", that does it all in one line.
  • Admin
    Admin almost 2 years
    That's right! Thanks for coming into the party ( BTW nice editing )