Bash #13 - Log files and commands to view them

Published: 12 March 2022
on channel: itvraag
2,618
20

In this video we'll go through different log files in Debian and Fedora based distros like Ubuntu and RedHat. We'll also cover different commands that help viewing the log files.
#terminal #linux #logs #rockylinux #ubuntu #redhat
https://itvraag.nl

Timestamp:
0:00 Intro
0:19 my setup with Ubuntu & Rocky Linux VMs
0:40 log files path
0:55 list of log files
1:13 commands to view log files
1:35 cat syslog
2:38 less auth.log
3:15 tail dpkg.log (most recent)
3:50 head kern.log
4:21 watch auth.log (live logs)
4:48 grep logs (search pattern)
5:46 dmesg (diagnotic messages)
6:19 logger (custom logs entries to syslog)
6:48 journalctl
8:40 log priorities

Related video:
Bash #1 - basic concepts:    • Bash #1 - Basic concepts and requirem...  
Bash #4 - variables:    • Bash #4 - working with variables (wit...  
Bash #6 - package manager APT:    • Bash #6 - Package manager APT (Debian...  
Bash #7 - package manager DNF:    • RedHat #1 - Package manager DNF (Fedo...  
Vagrant #6 - Hyper-V:    • Vagrant #6 - In Windows 11 with Hyper-V  

Used commands:
hostnamectl
cd /var/log
sudo cat syslog
sudo less auth.log
sudo tail dpkg.log
sudo tail -5 dpkg.log
sudo head kern.log
sudo head -5 kern.log
sudo watch tail auth.log
sudo grep -i service syslog
sudo cat syslog | grep -i service
sudo tail kern.log | grep audit
sudo cat auth.log | grep failure
sudo dmesg
sudo dmesg | grep -i driver
sudo dmesg | grep -i usb
sudo dmesg --level=err,warn
sudo dmesg -T --level=err,warn
sudo dmesg --follow
sudo watch tail syslog
sudo logger adding a custom log entry for itvraag
sudo logger testing a new log entry by $USER on $(date)
journalctl
journalctl -r
journalctl -n 4
journalctl -fu ssh
journalctl --list-boots
journalctl -b 2
journalctl --since="2022-03-10 19:40:00"
journalctl --since "10 min ago"


Watch video Bash #13 - Log files and commands to view them online, duration hours minute second in high quality that is uploaded to the channel itvraag 12 March 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,618 times and liked it 20 visitors.